pub trait DynamicCodeWrite {
// Required method
fn write<E: Endianness, CW: CodesWrite<E> + ?Sized>(
&self,
writer: &mut CW,
value: u64,
) -> Result<usize, CW::Error>;
}
Expand description
A trait providing a method to write a code to a generic CodesWrite
.
The difference with StaticCodeWrite
is that this trait is more generic,
as the CodesWrite
is a parameter of the method, and not of the trait.
Required Methods§
fn write<E: Endianness, CW: CodesWrite<E> + ?Sized>( &self, writer: &mut CW, value: u64, ) -> Result<usize, CW::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.
Implementors§
impl DynamicCodeWrite for Codes
impl DynamicCodeWrite for MinimalBinary
impl<W: DynamicCodeWrite, const ZETA: usize, const GOLOMB: usize, const EXP_GOLOMB: usize, const RICE: usize, const PI: usize> DynamicCodeWrite for CodesStatsWrapper<W, ZETA, GOLOMB, EXP_GOLOMB, RICE, PI>
Available on crate feature
std
only.