Trait irox_structs::Struct

source ·
pub trait Struct {
    type ImplType;

    // Required methods
    fn write_to<T: MutBits>(&self, out: &mut T) -> Result<(), Error>;
    fn parse_from<T: Bits>(input: &mut T) -> Result<Self::ImplType, Error>;

    // Provided method
    fn as_bytes(&self) -> Result<Vec<u8>, Error> { ... }
}

Required Associated Types§

Required Methods§

source

fn write_to<T: MutBits>(&self, out: &mut T) -> Result<(), Error>

source

fn parse_from<T: Bits>(input: &mut T) -> Result<Self::ImplType, Error>

Provided Methods§

source

fn as_bytes(&self) -> Result<Vec<u8>, Error>

Object Safety§

This trait is not object safe.

Implementors§