pub trait EncodeBinary {
type Error;
// Required method
fn encode_binary(&self) -> Result<Vec<u8>, Self::Error>;
}Expand description
Minimal encode trait for binary format value types.
Required Associated Types§
Required Methods§
Sourcefn encode_binary(&self) -> Result<Vec<u8>, Self::Error>
fn encode_binary(&self) -> Result<Vec<u8>, Self::Error>
Encodes a value into an owned byte buffer.
§Errors
Self::Error, on terms the implementing format decides. There is no
I/O here, so a failure is a value the format cannot represent.