Module std.machine.watch
Bounded, lag-visible observation of an explicitly owned machine.
Stepping calls the machine's ordinary evaluator. Subscribers independently
read committed notices; outputs remain owned by the caller of step.
Contents
- fn observe
- struct Snapshot
- struct Notice
- struct Lag
- enum SubscribeError
- struct Owner
- struct Feed
- struct Subscription
Functions
Function observe
pub fn observe<M: Machine + Send>(initial: M, capacity: i64, subscribers: i64) -> Result<(Owner<M.Event, M.Step>, Feed<M>), string> where M.Event: Send, M.Step: Send
Create an independent observed copy, with bounded history and subscribers.
Types
Struct Snapshot
Fields
- state: M
- revision: i64
Struct Lag
Fields
- last_seen: i64
- available_from: i64
Enum SubscribeError
Variants
ClosedLimitExhausted
Struct Owner
Fields
- drive: fn(E) -> R