pub trait ToBytes {
// Required method
fn to_bytes(&self) -> &[u8] ⓘ;
}
Expand description
A cheap conversion from typed data to a byte slice.
Given some data, returns the byte representation of that data. No copy of the data should be performed.
See also the FromBytes
trait.