Expand description
Frame extraction strategies.
A Framer is a stateless protocol that locates and emits one frame at a
time from a borrowed byte slice. Frames are described by Frame, which
carries a zero-copy reference to the payload alongside the count of bytes
the framer consumed from the input.
Two concrete framers ship with the crate:
length::LengthPrefixedfor fixed-width length-prefixed protocols.delimiter::Delimitedfor byte-delimited protocols such as newline- terminated text.
Custom framers are implemented by writing a Framer impl on a user-defined
type.
Re-exports§
pub use delimiter::Delimited;pub use length::Endian;pub use length::LengthPrefixed;pub use length::LengthWidth;
Modules§
Structs§
- Frame
- A frame extracted from an input byte slice.
Traits§
- Framer
- Strategy that extracts and emits one frame at a time.