Skip to main content

Crate pushwire

Crate pushwire 

Source

Re-exports§

pub use pushwire_client;

Modules§

binary
channel
delta
fragments
rtc
types

Structs§

BinaryFlags
Flags describing frame properties.
BinaryFrame
Binary frame format: [magic:2][version:1][flags:1][channel:1][sequence:4][payload:var]
CompressionConfig
Compression options for encoding/decoding.
CompressionDictionary
Pre-trained zstd dictionary with a numeric ID.
FragmentAssembler
Assembles fragments keyed by fragment_id until all parts arrive.
FragmentRetention
Retention/cleanup policy for fragments.
FragmentShard
Frame
Envelope for multiplexed frames. Payloads are intentionally generic so downstream services can attach their own typed content.
PayloadDelta
Delta against a base cursor for content payloads.
RtcRouter
TurnCredential

Enums§

BinaryEnvelope
Envelope for binary assets delivered over the push channel.
BinaryError
DeltaApplyResult
DeltaError
DeltaOp
FragmentError
PayloadEncoding
Encoding used for the payload body.
RtcMessage
RTC signaling messages carried on the rtc channel.
SystemOp
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§

ChannelKind
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.

Type Aliases§

RawPayload