pub trait StaticCodeRead<E: Endianness, CR: CodesRead<E> + ?Sized> {
// Required method
fn read(&self, reader: &mut CR) -> Result<u64, CR::Error>;
}
Expand description
A trait providing a method to read a code from a CodesRead
specified as
trait type parameter.
The difference with DynamicCodeRead
is that this trait is more specialized,
as the CodesRead
is a parameter of the trait.
For a fixed code this trait may be implemented by storing a function pointer.