Function bincode::serde::serialize_into [] [src]

pub fn serialize_into<W, T>(writer: &mut W, value: &T, size_limit: SizeLimit) -> SerializeResult<()> where W: Write, T: Serialize

Serializes an object directly into a Writer.

If the serialization 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 SerializeError (other than SizeLimit), assume that the writer is in an invalid state, as writing could bail out in the middle of serializing.