Trait netservices::frame::Frame

source ·
pub trait Frame: Send + Sized {
    type Error: Error + Send;

    fn unmarshall(reader: impl Read) -> Result<Option<Self>, Self::Error>;
    fn marshall(&self, writer: impl Write) -> Result<usize, Self::Error>;
}

Required Associated Types§

Required Methods§

Reads frame from the stream.

If the stream doesn’t contain the whole message yet must return Ok(None)

Implementors§