Trait SerializeBytes
pub trait SerializeBytes: Size {
// Required method
fn tls_serialize(&self) -> Result<Vec<u8>, Error>;
}Available on 32-bit or 64-bit only.
Expand description
The SerializeBytes trait provides a function to serialize a struct or enum.
The trait provides one function:
tls_serializethat returns a byte vector
Required Methods§
fn tls_serialize(&self) -> Result<Vec<u8>, Error>
fn tls_serialize(&self) -> Result<Vec<u8>, Error>
Serialize self and return it as a byte vector.