to_bytes

Function to_bytes 

Source
pub fn to_bytes<T>(value: &T) -> Result<Vec<u8>, CompatSerializationError>
where T: Serialize,
Expand description

Serialize data into a vector of bytes.

Serializes a generic data type into a new instance of Vec<u8>.