Skip to main content

to_bytes

Function to_bytes 

Source
pub fn to_bytes<T: Serialize + ?Sized>(value: &T) -> Result<Vec<u8>>
Expand description

Serialize a value to bencode bytes.

ยงErrors

Returns an error if the value cannot be serialized to bencode.