Trait alkahest::Schema [−][src]
pub trait Schema: for<'a> SchemaUnpack<'a> + 'static { type Packed: Pod; fn align() -> usize; fn unpack<'a>(packed: Self::Packed, input: &'a [u8]) -> Unpacked<'a, Self>; }
Expand description
Trait for data schemas.
This trait requires implementation of SchemaUnpack
trait for all lifetimes.
Associated Types
Required methods
Alignment required for successful unpacking.
See Self::unpack
method.
Unpack the value from packed value and bytes.
input
must be aligned according to Self::align
.