pushwire-core 0.1.1

Shared types and codecs for push-wire multiplexed push protocol
Documentation
//! `push-wire-core` — shared types and codecs for the push-wire protocol.
//!
//! This crate contains the wire types, binary codec, fragment assembler,
//! and delta algorithm shared by both `push-wire-server` and `push-wire-client`.
//! All public types are parameterized by the [`ChannelKind`] trait, allowing
//! consumers to define their own channel taxonomy.

pub mod binary;
pub mod channel;
pub mod delta;
pub mod fragments;
pub mod types;

#[cfg(feature = "rtc")]
pub mod rtc;

// Core trait
pub use channel::{ChannelKind, parse_channels};

// Frame types (generic over C: ChannelKind)
pub use types::{BinaryEnvelope, Frame, RawPayload, SystemOp};

// Binary codec (generic over C: ChannelKind)
pub use binary::{
    BinaryError, BinaryFlags, BinaryFrame, CompressionConfig, CompressionDictionary, MAGIC_HEADER,
    PayloadEncoding, VERSION_BYTE, decode_frame, decode_frame_with_dictionaries, encode_frame,
    encode_frame_with_compression, train_dictionary,
};

// Delta
pub use delta::{DeltaApplyResult, DeltaError, DeltaOp, PayloadDelta, apply_delta, compute_delta};

// Fragments
pub use fragments::{
    FRAGMENT_HEADER_LEN, FragmentAssembler, FragmentError, FragmentRetention, FragmentShard,
};

// WebRTC signaling (optional)
#[cfg(feature = "rtc")]
pub use rtc::{RtcMessage, RtcRouter, TurnCredential};