Function zlo::serialize_into [] [src]

pub fn serialize_into<W, T: ?Sized, S>(
    writer: W,
    value: &T,
    size_limit: S
) -> Result<()> where
    W: Write,
    T: Serialize,
    S: SizeLimit

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