Expand description
push-wire-client — generic multiplexed push client.
Provides PushClient parameterized by ChannelKind, with WebSocket
and SSE transports, cursor tracking, automatic reconnection with resume,
and channel-based message dispatch via ChannelReceiver.
Re-exports§
pub use connection::TransportPreference;pub use cursor::CursorTracker;pub use dispatch::ChannelReceiver;pub use reconnect::ReconnectPolicy;pub use session::ClientConfig;pub use session::ConnectError;pub use session::ConnectionState;pub use session::PushClient;pub use session::SendError;
Modules§
- auth
- Authentication handshake logic.
- binary
- channel
- connection
- cursor
- delta
- dispatch
- fragments
- reconnect
- rtc
- session
- subscription
- Channel subscription management.
- types
Structs§
- Binary
Flags - Flags describing frame properties.
- Binary
Frame - Binary frame format:
[magic:2][version:1][flags:1][channel:1][sequence:4][payload:var] - Compression
Config - Compression options for encoding/decoding.
- Compression
Dictionary - Pre-trained zstd dictionary with a numeric ID.
- Fragment
Assembler - Assembles fragments keyed by fragment_id until all parts arrive.
- Fragment
Retention - Retention/cleanup policy for fragments.
- Fragment
Shard - Frame
- Envelope for multiplexed frames. Payloads are intentionally generic so downstream services can attach their own typed content.
- Payload
Delta - Delta against a base cursor for content payloads.
- RtcRouter
- Turn
Credential
Enums§
- Binary
Envelope - Envelope for binary assets delivered over the push channel.
- Binary
Error - Delta
Apply Result - Delta
Error - DeltaOp
- Fragment
Error - Payload
Encoding - Encoding used for the payload body.
- RtcMessage
- RTC signaling messages carried on the
rtcchannel. - System
Op - System control plane messages that travel on the system channel.
Constants§
- FRAGMENT_
HEADER_ LEN - Header: [fragment_id:16][total:2][index:2]
- MAGIC_
HEADER - Magic bytes prefixing every binary frame (“RP”).
- VERSION_
BYTE - Version byte for future evolution.
Traits§
- Channel
Kind - Trait for defining multiplexed channel types.
Functions§
- apply_
delta - Apply a delta on the client. If the base cursor does not match or the delta is empty, it signals full sync.
- compute_
delta - Compute a naive delta that replaces the tree when the content differs.
- decode_
frame - Decode a frame without any pre-shared dictionaries.
- decode_
frame_ with_ dictionaries - Decode a frame using a set of pre-shared dictionaries.
- encode_
frame - Encode without compression using the default settings.
- encode_
frame_ with_ compression - Encode with optional per-frame compression.
- parse_
channels - Parse a comma-separated channel list (e.g. from SSE query params).
- train_
dictionary - Train a zstd dictionary from samples.