pub struct Packed<C, const P: usize> { /* private fields */ }Expand description
Unpacks P sub-codes from one stored byte, then defers to C.
The i4 tier is Packed<Grid<16>, 2>. Low sub-code first — normative,
pinned by case nibble-order and asserted by CK-03.
P is arbitrary: two nibbles, four two-bit codes, eight one-bit codes. The
sub-code width is 8 / P, so P must divide 8, which Packed::new
checks once at construction.
Implementations§
Trait Implementations§
Source§impl<E, Bd, C, const P: usize> Codec<E, Bd> for Packed<C, P>
impl<E, Bd, C, const P: usize> Codec<E, Bd> for Packed<C, P>
Source§const TIER: TierId = TierId::Packed
const TIER: TierId = TierId::Packed
Which tier this is, for reports and for the kappa manifest.
Source§const IS_FIXED_WIDTH: bool = C::IS_FIXED_WIDTH
const IS_FIXED_WIDTH: bool = C::IS_FIXED_WIDTH
Source§fn decode_len(&self, _code: Self::Code) -> usize
fn decode_len(&self, _code: Self::Code) -> usize
How many elements
code actually produces. Read moreimpl<C: Copy, const P: usize> Copy for Packed<C, P>
Source§impl<E, Bd, C, const P: usize> Enumerable<E, Bd> for Packed<C, P>
impl<E, Bd, C, const P: usize> Enumerable<E, Bd> for Packed<C, P>
Source§const CODE_SPACE: usize
const CODE_SPACE: usize
The number of distinct codes. 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 moreSource§fn as_index_stream(codes: &[Self::Code]) -> Option<IndexStream<'_>>
fn as_index_stream(codes: &[Self::Code]) -> Option<IndexStream<'_>>
The stored code stream, read as the index stream it already is. Read more
Auto Trait Implementations§
impl<C, const P: usize> Freeze for Packed<C, P>where
C: Freeze,
impl<C, const P: usize> RefUnwindSafe for Packed<C, P>where
C: RefUnwindSafe,
impl<C, const P: usize> Send for Packed<C, P>where
C: Send,
impl<C, const P: usize> Sync for Packed<C, P>where
C: Sync,
impl<C, const P: usize> Unpin for Packed<C, P>where
C: Unpin,
impl<C, const P: usize> UnsafeUnpin for Packed<C, P>where
C: UnsafeUnpin,
impl<C, const P: usize> UnwindSafe for Packed<C, P>where
C: UnwindSafe,
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