Function bincode::encode_into [] [src]

pub fn encode_into<T: Encodable, W: Write>(t: &T, w: &mut W, size_limit: SizeLimit) -> EncodingResult<()>

Encodes an object directly into a Writer.

If the encoding would take more bytes than allowed by size_limit, an error is returned and no bytes will be written into the Writer.

If this returns an EncodingError (other than SizeLimit), assume that the writer is in an invalid state, as writing could bail out in the middle of encoding.