Module session
Expand description
Session state storage.
The State trait abstracts the state that is kept across
connections (§4.1). With alloc, InMemory provides a
heap-backed implementation. journal::JournaledSession wraps it with an
append-only operation log for durable persistence.
Modules§
- in_
memory 🔒alloc - journal
alloc - Append-only session operation log and its CRC-framed encoding.
- ops 🔒
- Serializable operations for mutating session state.
Structs§
- Filter
Entry - Filter entry with its topic filter and lifecycle state.
- InMemory
alloc - In-memory implementation of
State. - Ops
- A validated byte slice known to contain a well-formed sequence of
encoded
Ops. - OpsBuf
alloc - A heap-backed, owned buffer of encoded
Ops. - OpsIter
- Iterator over operations in a
Opsbuffer. - Outbox
Entry - A stored outgoing publish awaiting acknowledgement.
- Pending
Meta - The next pending SUBSCRIBE/UNSUBSCRIBE group to send, returned by
first_pending_group. - Subscription
Spec - The options and subscription identifier of a subscription.
Enums§
- Applied
- Outcome of
State::apply: whether the mutation took effect. - Drain
Action - What a
drain_outbox/drain_pubrelvisitor decides for the entry it was handed. - Filter
State - Lifecycle state of a topic filter.
- Modify
- An
Opthat changes or removes stored data, applied withState::modify. - Op
- A mutation to session state, in a form that can be serialized and replayed.
- OpDecode
Error - Why encoded journal-op bytes could not be decoded.
- Pending
Kind - Whether a pending group is a SUBSCRIBE or an UNSUBSCRIBE, returned as part
of
PendingMeta. - Resolution
- What a
resolve_pendingclosure decides for one pending filter entry. - Store
- An
Opthat stores new data, applied withState::store.
Traits§
- State
- Persistent session state that is kept across network connections.