Expand description
Session/state machine and RPC-level utilities.
Canonical definitions live in docs/content/spec/_index.md,
docs/content/rust-spec/_index.md, and docs/content/shm-spec/_index.md.
Re-exports§
pub use driver::ConnectError;pub use driver::ConnectionError;pub use driver::Driver;pub use driver::FramedClient;pub use driver::HandshakeConfig;pub use driver::IncomingConnection;pub use driver::IncomingConnections;pub use driver::MessageConnector;pub use driver::Negotiated;pub use driver::NoDispatcher;pub use driver::RetryPolicy;pub use driver::accept_framed;pub use driver::connect_framed;pub use driver::connect_framed_with_policy;pub use driver::initiate_framed;pub use transport::MessageTransport;
Modules§
- diagnostic
- Diagnostic state tracking for SIGUSR1 dumps.
- driver
- Bidirectional connection driver for message-based transports.
- runtime
- Runtime abstraction layer for tokio/WASM portability.
- transport
- Message transport abstraction.
Structs§
- Call
Future - A future representing an RPC call that can be configured with metadata.
- Channel
IdAllocator - Allocates unique stream IDs with correct parity.
- Channel
Registry - Registry of active streams for a connection.
- Connection
Handle - Handle for making outgoing RPC calls.
- Context
- Context passed to service method implementations.
- Driver
TxSlot - A wrapper around
Option<Sender<DriverMessage>>that implements Facet. - Forwarding
Dispatcher - A dispatcher that forwards all requests to an upstream connection.
- Frame
- Owned frame for sending, receiving, or routing.
- Infinite
Credit - No-op flow control for infinite credit mode.
- Late
Bound Forwarder - A dispatcher that forwards all requests to a late-bound upstream connection.
- Late
Bound Handle - A handle that can be set once after creation.
- MsgDesc
- Message descriptor (64 bytes) per SHM spec.
- Never
- Owned
Message - A deserialized value co-located with its backing frame.
- Receiver
Slot - A wrapper around
Option<Receiver<Vec<u8>>>that implements Facet. - Request
IdGenerator - Generates unique request IDs for a connection.
- Response
Data - Response data returned from a call, including any response stream channels.
- Routed
Dispatcher - A dispatcher that routes to one of two dispatchers based on method ID.
- Rx
- Rx stream handle - caller receives data from callee.
- Sender
Slot - A wrapper around
Option<Sender<Vec<u8>>>that implements Facet. - Tunnel
- A bidirectional byte tunnel over roam channels.
- Tx
- Tx stream handle - caller sends data to callee.
Enums§
- Call
Error - Error from making an outgoing call.
- Channel
Error - Error when routing stream data.
- Client
Error - Decode
Error - Error decoding a response payload.
- Dispatch
Error - Driver
Message - All messages to the connection driver go through a single channel.
- Payload
- Payload storage for a frame.
- Roam
Error - Call error type encoded in RPC responses.
- Role
- Connection role - determines stream ID parity.
- RxError
- Error when receiving from a Rx stream.
- Transport
Error - Transport-level call error (no user error type).
- TxError
- Error when sending on a Tx stream.
Constants§
- DEFAULT_
TUNNEL_ CHUNK_ SIZE - Default chunk size for tunnel pumps (32KB).
Traits§
- Caller
- Trait for making RPC calls.
- Flow
Control - Abstraction for stream flow control mechanism.
- Service
Dispatcher - Trait for dispatching requests to a service.
Functions§
- channel
- Create an unbound channel pair for streaming RPC.
- collect_
channel_ ids - Collect channel IDs from args by walking with Peek.
- decode_
response - Decode a response payload into the expected type.
- dispatch_
call - Helper for dispatching RPC methods with minimal generated code.
- dispatch_
call_ infallible - Dispatch helper for infallible methods (those that return
Tinstead ofResult<T, E>). - dispatch_
unknown_ method - Send an “unknown method” error response.
- patch_
channel_ ids - Patch channel IDs into deserialized args by walking with Poke.
- pump_
read_ to_ tx - Pump bytes from an
AsyncReadinto aTx<Vec<u8>>. - pump_
rx_ to_ write - Pump bytes from an
Rx<Vec<u8>>into anAsyncWrite. - tunnel_
pair - Create a pair of connected tunnels.
- tunnel_
stream - Tunnel a bidirectional stream through a roam Tunnel.
Type Aliases§
- Borrowed
Call Result - Call
Result - Channel
Id - Stream ID type.