docs/generated/contracts.mdgenerated from code
Reference · 1 min read
journal-to
Contracts: journal-to.
Read as
Source: crates/lvcs-runtime/src/journal.rs.
1/// The close of a machine journaled as `actor` to `writer` (discussion:owner/341,2/// 403, and 439): each step's entry is queued to the writer when the close3/// is called, so entries go in step order, and the close's future awaits4/// the writer's acknowledgement before the step's outputs reach `shell`,5/// which also learns whether the machine stopped (reached `X`). A step a6/// failed journal didn't write has its outputs dropped, since replay7/// couldn't account for them and the project stops; one a closed journal8/// didn't write (the project closing) still hands them on.9pub fn to<E, O, C>(10 actor: ActorId,11 writer: Writer,12 shell: impl Fn(Vec<O>, bool) + Send + Sync + 'static,13) -> Close<E, O, C>14where15 E: Serialize + 'static,16 O: Send + 'static,17 C: Serialize + PartialEq + 'static,