pub trait ToBytes {
// Required method
fn to_bytes(&self) -> Result<Vec<u8>, Box<dyn Error + Sync + Send>>;
}
Expand description
The ToBytes
trait needs to be implemented by all types
that need to be encoded.
pub trait ToBytes {
// Required method
fn to_bytes(&self) -> Result<Vec<u8>, Box<dyn Error + Sync + Send>>;
}
The ToBytes
trait needs to be implemented by all types
that need to be encoded.