pub trait ToSbe {
// Required method
fn to_sbe(&self) -> Result<Vec<u8>, SbeEncodeError>;
// Provided method
fn to_sbe_into(&self, buf: &mut Vec<u8>) -> Result<(), SbeEncodeError> { ... }
}Required Methods§
Provided Methods§
Sourcefn to_sbe_into(&self, buf: &mut Vec<u8>) -> Result<(), SbeEncodeError>
fn to_sbe_into(&self, buf: &mut Vec<u8>) -> Result<(), SbeEncodeError>
Encodes the value into the provided SBE message buffer.
This method clears any existing bytes in buf before encoding.
§Errors
Returns an error if any field cannot be encoded into the target SBE wire format.