pub struct TurboCodeWireHeader {
pub dim: usize,
pub polar_bits: u8,
pub qjl_projections: usize,
pub seed: u64,
pub polar_block_count: usize,
pub qjl_sign_count: usize,
pub payload_len: u64,
pub rotation_kind: RotationKind,
}Expand description
Decoded TurboQuant wire header. The wire format carries the full
quantizer profile (dim, bits, projections, seed, mode, rotation kind)
in the first 44 bytes, so a TurboCode can be reconstructed from
the wire bytes alone — no external quantizer required.
Fields§
§dim: usizeOriginal vector dimension.
polar_bits: u8Polar-code bits per angle (b in the paper; b-1 for PolarWithQjl mode).
qjl_projections: usizeQJL projection count for the residual sketch.
seed: u64Seed used to derive the projection state.
polar_block_count: usizeNumber of polar code blocks (≈ dim / 2).
qjl_sign_count: usizeQJL sign count (0 for PolarOnly mode).
payload_len: u64Length of the payload section following the header.
rotation_kind: RotationKindRotation kind embedded in the wire.
Trait Implementations§
Source§impl Clone for TurboCodeWireHeader
impl Clone for TurboCodeWireHeader
Source§fn clone(&self) -> TurboCodeWireHeader
fn clone(&self) -> TurboCodeWireHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TurboCodeWireHeader
impl Debug for TurboCodeWireHeader
impl Eq for TurboCodeWireHeader
Source§impl PartialEq for TurboCodeWireHeader
impl PartialEq for TurboCodeWireHeader
Source§fn eq(&self, other: &TurboCodeWireHeader) -> bool
fn eq(&self, other: &TurboCodeWireHeader) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TurboCodeWireHeader
Auto Trait Implementations§
impl Freeze for TurboCodeWireHeader
impl RefUnwindSafe for TurboCodeWireHeader
impl Send for TurboCodeWireHeader
impl Sync for TurboCodeWireHeader
impl Unpin for TurboCodeWireHeader
impl UnsafeUnpin for TurboCodeWireHeader
impl UnwindSafe for TurboCodeWireHeader
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.