Expand description
Sessions and lanes.
r[impl jetstream.session.overview]
A session is the association with a peer: it carries identity and
capabilities and can open and accept lanes. A lane is one
ordered, reliable, flow-controlled sequence of frames — exactly what
ClientTransport describes from one end and ServiceTransport
from the other. A session orders nothing; ordering is a property of a
lane and only of a lane.
r[impl jetstream.session.overview.additive]
Nothing here changes the ClientTransport or ServiceTransport
bounds. A lane is a value satisfying them; what a session adds is a
way to obtain one without naming the concrete transport. Code that
holds a single transport and multiplexes by tag keeps working.
Re-exports§
pub use self::lifetime::LaneGuard;pub use self::local::LocalSession;pub use self::local::LocalSessionPair;
Modules§
Structs§
- Capabilities
- What a session can do.
- Lane
Order - Hands out delivery order for one lane.
- NoClient
Lane - The caller’s end of a lane a session can never open.
- NoService
Lane - The callee’s end of a lane a session can never accept.
- Order
Ticket - One frame’s place in a lane’s delivery order.
- Single
Lane Session - A session over a transport that carries exactly one lane.
Enums§
- Capability
- A single capability, named so that a session can say what it is missing when code asks for something it does not have.
- Identity
Kind - The peer identity model a session’s transport establishes.
- Lane
Support - How many lanes a session can carry.
- Session
Error - Something a session was asked to do and could not.
Traits§
- Datagrams
- The optional unordered channel belonging to a session.
- Session
- An association with a peer, from which lanes are obtained.
Functions§
- check_
datagram_ size - r[impl jetstream.session.datagrams] Reject an oversized frame at the send site, which is the only place that can report it: a frame that exceeds the path limit is not fragmented, so there is nothing further down to notice.
- decode_
datagram - r[impl jetstream.session.datagrams] Decode one datagram, which carries a complete frame or is discarded. There is nothing to reassemble it from, so bytes after the frame mean it is not a complete frame either: decoding would succeed on the prefix and hand back something the peer never sent.
- encode_
datagram - r[impl jetstream.session.datagrams] Encode a frame for the datagram channel, refusing one the path cannot carry.