Skip to main content

Crate recon_core

Crate recon_core 

Source
Expand description

Core abstractions for sans-IO distributed protocols.

A protocol here is a synchronous state machine: it consumes events and emits effects. It never awaits, never reads a clock, never draws ambient randomness, and never performs input or output. Everything it needs from the world arrives through Cx, which is what makes a run reproducible from a seed and a protocol testable as a plain function.

Layers compose by ownership: a parent holds its child as a typed field and re-wraps the child’s effects into its own terms via Cx::with_child. There is no registry, no string key, and no lookup performed while running — a mis-wired stack fails to compile.

Re-exports§

pub use child::Child;
pub use cx::Cx;
pub use cx::EffectSink;
pub use cx::NoNotes;
pub use cx::NoteSink;
pub use effect::Effect;
pub use effect::TimerId;
pub use effect::WriteKind;
pub use node::NodeId;
pub use protocol::Event;
pub use protocol::ProtoCx;
pub use protocol::ProtoEffect;
pub use protocol::ProtoEvent;
pub use protocol::Protocol;
pub use protocol::step;
pub use protocol::step_in;
pub use protocol::step_noting;
pub use protocol::step_with;
pub use session::SessionEvent;
pub use store::KeyedSlot;
pub use store::MemStore;
pub use store::NoStore;
pub use store::Position;
pub use store::SeqSlot;
pub use store::Slot;
pub use store::Store;
pub use time::Time;

Modules§

child
A child protocol with the inbox its indications are collected into.
cx
Where a protocol’s effects go, and how it is told the time.
effect
The vocabulary through which a protocol affects the world.
error
Error conventions.
node
Process identity.
protocol
The protocol contract.
session
What a protocol learns about the sessions carrying its messages.
store
Durable state, read and written synchronously.
time
Virtual monotonic time.

Macros§

slot
A Slot for an Option field of a Clone + Default parent record — the common case.