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>;
}
Expand description
A struct is a series of bytes in memory, serialized in the order that the fields are present in the struct.
Generally speaking, you shouldn’t need to implement this, unless you need
some custom encoding. It’s intended to be used with irox_structs_derive
to automatically
generate the impl.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.