pub trait ToBytes: Debug {
// Required method
fn to_bytes(&self, buffer: &mut Cursor<Vec<u8>>) -> Result<(), SerError>;
// Provided method
fn pad(&self, buffer: &mut Cursor<Vec<u8>>) -> Result<(), SerError> { ... }
}
Expand description
A trait defining a netlink data structure’s conversion to a byte buffer.