pub fn serialize_to_buffer<T>(value: &T, buffer: &mut Vec<u8>) -> Result<()>where
T: Serialize,
Available on crate feature
serde
only.Expand description
Serialize the given T
as a BSON byte vector into the provided byte buffer.
This allows reusing the same buffer for multiple serializations.