Function apply_local
pub fn apply_local(
doc: &mut AutoCommit,
action: &dyn Action,
encoded: EncodedAction,
) -> Result<ActionEnvelope, ActionError>Expand description
Apply action to the local replica and return its replayable
envelope. encoded is the serialized form carried to peers โ must
encode the same action.
ยงErrors
Returns whatever Action::apply returns
for action โ typically ActionError::Automerge for a document
write failure, or ActionError::Refused if the app declined the action.