pub fn serialize_into_with_limit<T: Serialize, W: Write>(
    data: &T,
    write: &mut W,
    size_limit: u64,
) -> Result<(), SerializationError> {
    bincode::DefaultOptions::new()
        .with_fixint_encoding()
        .allow_trailing_bytes()
        .with_limit(size_limit)
        .serialize_into(write, data)
        .map_err(Into::into)
}
/// serialize an `Serialize` type directly into a `Write` with max size limit specified.
serialize an `Serialize` type directly into a `Write` with max size limit specified.
serialize an ` Serialize ` type directly into a ` Write ` with max size limit specified .
pub fn serialize_into_with_limit<T: Serialize, W: Write>(
    data: &T,
    write: &mut W,
    size_limit: u64,
) -> Result<(), SerializationError> {
    bincode::DefaultOptions::new()
        .with_fixint_encoding()
        .allow_trailing_bytes()
        .with_limit(size_limit)
        .serialize_into(write, data)
        .map_err(Into::into)
}
pub fn serialize_into_with_limit < T : Serialize , W : Write > ( data : & T , write : & mut W , size_limit : u64 , ) -> Result < ( ) , SerializationError > { bincode :: DefaultOptions :: new ( ) . with_fixint_encoding ( ) . allow_trailing_bytes ( ) . with_limit ( size_limit ) . serialize_into ( write , data ) . map_err ( Into :: into ) }
serialize an `Serialize` type directly into a `Write` with max size limit specified.
serialize an ` Serialize ` type directly into a ` Write ` with max size limit specified .
data
&T
write
&mut W
size_limit
u64
data
&T
write
&mut W
size_limit
u64