Skip to main content

FramedRead

Trait FramedRead 

Source
pub trait FramedRead {
    // Required method
    fn read(&mut self, out: &mut [u8]) -> Result<(), EndOfFrame>;
}
Expand description

A source of framed payload bytes read on demand. This keeps the framing and word-transport concern in core, decoupled from any serializer — a bincode bridge over FramedRead lives in the codec crate, so core needs no dependency on bincode.

Required Methods§

Source

fn read(&mut self, out: &mut [u8]) -> Result<(), EndOfFrame>

Fill out completely, or return EndOfFrame without advancing if the frame does not hold that many more bytes.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§