Skip to main content

append_op

Function append_op 

Source
pub fn append_op(
    log: &mut dyn OpLog,
    submitter: &str,
    op: ViewOp,
) -> Result<ContentHash, ViewError>
Expand description

Validates op against the log’s current view, then appends it as a new OpEntry — the single-writer submit path in miniature. The CAS check happens before the append, so the log never contains an op that fails to replay.

§Errors

Returns ViewError::StaleHead when the op’s precondition fails and ViewError::Log when the backend append fails.