[−][src]Function bincode::internal::serialize_into
pub fn serialize_into<W, T: ?Sized, S, E>(
writer: W,
value: &T,
size_limit: S
) -> Result<()> where
W: Write,
T: Serialize,
S: SizeLimit,
E: ByteOrder,
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.