Function fbthrift_git::binary_protocol::serialize_to_buffer[][src]

pub fn serialize_to_buffer<T>(
    v: T,
    buffer: BytesMut
) -> BinaryProtocolSerializer<BytesMut> where
    T: Serialize<BinaryProtocolSerializer<BytesMut>>, 

Serialize a Thrift value using the binary 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.