Skip to main content

write_frame

Function write_frame 

Source
pub fn write_frame<W, M>(w: &mut W, msg: &M) -> Result<(), FrameError>
where W: Write, M: Message,
Expand description

Writes a single framed protobuf message to w. The encoded length is prepended as a little-endian u32; if it exceeds MAX_FRAME_BYTES the call returns FrameError::LengthTooLarge without writing anything.