Skip to main content

Module session

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
journalalloc
Append-only session operation log and its CRC-framed encoding.
ops 🔒
Serializable operations for mutating session state.

Structs§

FilterEntry
Filter entry with its topic filter and lifecycle state.
InMemoryalloc
In-memory implementation of State.
Ops
A validated byte slice known to contain a well-formed sequence of encoded Ops.
OpsBufalloc
A heap-backed, owned buffer of encoded Ops.
OpsIter
Iterator over operations in a Ops buffer.
OutboxEntry
A stored outgoing publish awaiting acknowledgement.
PendingMeta
The next pending SUBSCRIBE/UNSUBSCRIBE group to send, returned by first_pending_group.
SubscriptionSpec
The options and subscription identifier of a subscription.

Enums§

Applied
Outcome of State::apply: whether the mutation took effect.
DrainAction
What a drain_outbox / drain_pubrel visitor decides for the entry it was handed.
FilterState
Lifecycle state of a topic filter.
Modify
An Op that changes or removes stored data, applied with State::modify.
Op
A mutation to session state, in a form that can be serialized and replayed.
OpDecodeError
Why encoded journal-op bytes could not be decoded.
PendingKind
Whether a pending group is a SUBSCRIBE or an UNSUBSCRIBE, returned as part of PendingMeta.
Resolution
What a resolve_pending closure decides for one pending filter entry.
Store
An Op that stores new data, applied with State::store.

Traits§

State
Persistent session state that is kept across network connections.