Module multiplex

Source
Expand description

Session and RPC client implementations for framed IPC with postcard.

This module provides:

  • A Session implementation that serializes and deserializes Message values using postcard over a framed transport.
  • A default RpcClient that correlates request/response pairs by RequestId, forwards cancellations, and exposes an events stream with bounded backpressure.

StreamManager is transport-only; data processing is delegated to services.

Structsยง

DefaultRpcClient
Default RpcClient built over a Session. It:
FramedSession
Adapter implementing Session on top of a framed connection that transports raw Bytes. Messages are encoded/decoded with postcard.
InMemoryBlobStore
In-memory BlobStore used by tests (and as a reference implementation).
IncomingStreamState ๐Ÿ”’

Constantsยง

DEFAULT_EVENTS_CAPACITY ๐Ÿ”’

Traitsยง

BlobStore
Simple blob store interface used for blob-backed flows.
RpcClient
RPC client interface layered on a Session, with request/response correlation and cancellation.
Session
A higher-level session that speaks the Message protocol over a FramedConnection.
StreamManager
Streaming control plane to coordinate substreams or blob-backed flows.

Functionsยง

response_id ๐Ÿ”’
Extract the RequestId from a Response.
to_ipc_error ๐Ÿ”’
Convert anyhow::Error into crate Error, preserving context.