Skip to main content

ToSbe

Trait ToSbe 

Source
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§

Source

fn to_sbe(&self) -> Result<Vec<u8>, SbeEncodeError>

Encodes the value into an SBE message buffer.

§Errors

Returns an error if any field cannot be encoded into the target SBE wire format.

Provided Methods§

Source

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.

Implementors§

Source§

impl<T> ToSbe for T
where T: MarketSbeMessage,