pub trait StaticCodeWrite<E: Endianness, CW: CodesWrite<E> + ?Sized> {
// Required method
fn write(&self, writer: &mut CW, value: u64) -> Result<usize, CW::Error>;
}
Expand description
A trait providing a method to write a code to a CodesWrite
specified as
a trait type parameter.
The difference with DynamicCodeWrite
is that this trait is more specialized,
as the CodesWrite
is a parameter of the trait.
For a fixed code this trait may be implemented by storing a function pointer.