pub struct Book<'a, E: IntegerElement, Bd: Bound, const N: usize, const BLK: usize, K: SymbolCode = u16> { /* private fields */ }Expand description
Any codebook: N entries of BLK alphabet elements each.
E8 is Book<256, 8>. Nothing privileges that shape; BLK and N are
parameters, and no quality claim attaches to any table (N3).
Implementations§
Source§impl<'a, E: IntegerElement, Bd: Bound, const N: usize, const BLK: usize, K: SymbolCode> Book<'a, E, Bd, N, BLK, K>
impl<'a, E: IntegerElement, Bd: Bound, const N: usize, const BLK: usize, K: SymbolCode> Book<'a, E, Bd, N, BLK, K>
Trait Implementations§
Source§impl<'a, E: Clone + IntegerElement, Bd: Clone + Bound, const N: usize, const BLK: usize, K: Clone + SymbolCode> Clone for Book<'a, E, Bd, N, BLK, K>
impl<'a, E: Clone + IntegerElement, Bd: Clone + Bound, const N: usize, const BLK: usize, K: Clone + SymbolCode> Clone for Book<'a, E, Bd, N, BLK, K>
Source§impl<E: IntegerElement, Bd: Bound, const N: usize, const BLK: usize, K: SymbolCode> Codec<E, Bd> for Book<'_, E, Bd, N, BLK, K>
impl<E: IntegerElement, Bd: Bound, const N: usize, const BLK: usize, K: SymbolCode> Codec<E, Bd> for Book<'_, E, Bd, N, BLK, K>
Source§fn decode_into(&self, code: Self::Code, out: &mut [Alphabet<E, Bd>]) -> usize
fn decode_into(&self, code: Self::Code, out: &mut [Alphabet<E, Bd>]) -> usize
Decode one code, returning how many elements were written. Read more
Source§const IS_FIXED_WIDTH: bool = true
const IS_FIXED_WIDTH: bool = true
impl<'a, E: Copy + IntegerElement, Bd: Copy + Bound, const N: usize, const BLK: usize, K: Copy + SymbolCode> Copy for Book<'a, E, Bd, N, BLK, K>
Source§impl<'a, E: Debug + IntegerElement, Bd: Debug + Bound, const N: usize, const BLK: usize, K: Debug + SymbolCode> Debug for Book<'a, E, Bd, N, BLK, K>
impl<'a, E: Debug + IntegerElement, Bd: Debug + Bound, const N: usize, const BLK: usize, K: Debug + SymbolCode> Debug for Book<'a, E, Bd, N, BLK, K>
Source§impl<E: IntegerElement, Bd: Bound, const N: usize, const BLK: usize, K: SymbolCode> Enumerable<E, Bd> for Book<'_, E, Bd, N, BLK, K>
impl<E: IntegerElement, Bd: Bound, const N: usize, const BLK: usize, K: SymbolCode> Enumerable<E, Bd> for Book<'_, E, Bd, N, BLK, K>
Source§const CODE_SPACE: usize
const CODE_SPACE: usize
The number of distinct codes. Read more
Source§fn as_index_stream(codes: &[K]) -> Option<IndexStream<'_>>
fn as_index_stream(codes: &[K]) -> Option<IndexStream<'_>>
The stored code stream, read as the index stream it already is. Read more
Source§const SIGN_BIT_BOOK: bool = false
const SIGN_BIT_BOOK: bool = false
Whether the decoded book is the sign bit-decomposition:
CODE_SPACE is a power of two and book[c][t] == 2 * bit(c, t) - 1
for every code c and every t below its log. Read moreAuto Trait Implementations§
impl<'a, E, Bd, const N: usize, const BLK: usize, K> Freeze for Book<'a, E, Bd, N, BLK, K>
impl<'a, E, Bd, const N: usize, const BLK: usize, K> RefUnwindSafe for Book<'a, E, Bd, N, BLK, K>where
E: RefUnwindSafe,
Bd: RefUnwindSafe,
impl<'a, E, Bd, const N: usize, const BLK: usize, K> Send for Book<'a, E, Bd, N, BLK, K>
impl<'a, E, Bd, const N: usize, const BLK: usize, K> Sync for Book<'a, E, Bd, N, BLK, K>
impl<'a, E, Bd, const N: usize, const BLK: usize, K> Unpin for Book<'a, E, Bd, N, BLK, K>
impl<'a, E, Bd, const N: usize, const BLK: usize, K> UnsafeUnpin for Book<'a, E, Bd, N, BLK, K>
impl<'a, E, Bd, const N: usize, const BLK: usize, K> UnwindSafe for Book<'a, E, Bd, N, BLK, K>where
E: RefUnwindSafe,
Bd: RefUnwindSafe,
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