[−][src]Function fbthrift_git::compact_protocol::serialize_to_buffer
pub fn serialize_to_buffer<T>(
v: T,
buffer: BytesMut
) -> CompactProtocolSerializer<BytesMut> where
T: Serialize<CompactProtocolSerializer<BytesMut>>,
Serialize a Thrift value using the compact protocol to a pre-allocated buffer.
This will panic if the buffer is not large enough. A buffer at least as
large as the return value of serialize_size
will not panic.