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§
Sourcefn read(&mut self, out: &mut [u8]) -> Result<(), EndOfFrame>
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".