Skip to main content

trillium_grpc/frame/
mod.rs

1//! gRPC message framing.
2//!
3//! Every gRPC message on the wire is a 5-byte prefix — one Compressed-Flag
4//! byte followed by a big-endian `u32` length — then that many payload bytes.
5//! A single HTTP/2 body carries a sequence of these frames.
6//!
7//! [`reader`] turns an `AsyncRead` body into a [`Stream`](futures_lite::Stream)
8//! of decoded messages; [`writer`] encodes a message (optionally compressed)
9//! into a frame. Codec and compression are both pushed in from the caller, so
10//! this layer is agnostic to message type and encoding.
11
12pub mod reader;
13pub mod writer;