pub struct ParamZetaCodec<const USE_TABLE: bool>;
Expand description
ParamZetaCodec: uses a compile‑time flag for ζ functions.
The compile‑time flag USE_TABLE
determines whether a lookup table is used. For more information refer to the Zeta
module.
Implementations§
Source§impl<const USE_TABLE: bool> ParamZetaCodec<USE_TABLE>
impl<const USE_TABLE: bool> ParamZetaCodec<USE_TABLE>
Sourcepub fn encode<E: Endianness, W: ZetaWriteParam<E>>(
writer: &mut W,
value: u64,
) -> Result<usize, Box<dyn Error>>
pub fn encode<E: Endianness, W: ZetaWriteParam<E>>( writer: &mut W, value: u64, ) -> Result<usize, Box<dyn Error>>
Encodes a value using the parameterized Zeta codec.
Sourcepub fn decode<E: Endianness, R>(reader: &mut R) -> Result<u64, Box<dyn Error>>where
R: ZetaReadParam<E>,
pub fn decode<E: Endianness, R>(reader: &mut R) -> Result<u64, Box<dyn Error>>where
R: ZetaReadParam<E>,
Decodes a value using the parameterized Zeta codec.
Trait Implementations§
Source§impl<E: Endianness, W: ZetaWriteParam<E>, const USE_TABLE: bool> Codec<E, W> for ParamZetaCodec<USE_TABLE>
impl<E: Endianness, W: ZetaWriteParam<E>, const USE_TABLE: bool> Codec<E, W> for ParamZetaCodec<USE_TABLE>
Auto Trait Implementations§
impl<const USE_TABLE: bool> Freeze for ParamZetaCodec<USE_TABLE>
impl<const USE_TABLE: bool> RefUnwindSafe for ParamZetaCodec<USE_TABLE>
impl<const USE_TABLE: bool> Send for ParamZetaCodec<USE_TABLE>
impl<const USE_TABLE: bool> Sync for ParamZetaCodec<USE_TABLE>
impl<const USE_TABLE: bool> Unpin for ParamZetaCodec<USE_TABLE>
impl<const USE_TABLE: bool> UnwindSafe for ParamZetaCodec<USE_TABLE>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
Source§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
Source§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
Source§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
Source§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
Source§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.