pub trait DynamicCodeRead {
// Required method
fn read<E: Endianness, CR: CodesRead<E> + ?Sized>(
&self,
reader: &mut CR,
) -> Result<u64, CR::Error>;
}
Expand description
A trait providing a method to read a code from a generic CodesRead
.
The difference with StaticCodeRead
is that this trait is more generic,
as the CodesRead
is a parameter of the method, and not of the trait.
Required Methods§
fn read<E: Endianness, CR: CodesRead<E> + ?Sized>( &self, reader: &mut CR, ) -> Result<u64, CR::Error>
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.