pub struct ShadowState {
pub positions: Vec<CoeffPos>,
pub bits: Vec<u8>,
pub n_total: usize,
pub parity_len: usize,
pub frame_data_len: usize,
pub frame_bytes: Vec<u8>,
pub perm_seed: [u8; 32],
pub cost_fraction: usize,
}Expand description
State for a single shadow layer during encoding.
Fields§
§positions: Vec<CoeffPos>Cost-filtered + hash-permuted embedding positions (Y channel nzAC).
bits: Vec<u8>The desired LSB bits (RS-encoded frame, no header).
n_total: usizeTotal bits = RS-encoded data.
parity_len: usizeCurrent RS parity length.
frame_data_len: usizeUnencoded frame byte count (before RS).
frame_bytes: Vec<u8>Raw frame bytes (before RS), needed for parity bump rebuild.
perm_seed: [u8; 32]Cached shadow structural key (ChaCha20 seed for position permutation).
cost_fraction: usizeCost pool fraction denominator (20=5%, 10=10%, 5=20%, 2=50%, 1=100%).
Trait Implementations§
Source§impl Clone for ShadowState
impl Clone for ShadowState
Source§fn clone(&self) -> ShadowState
fn clone(&self) -> ShadowState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ShadowState
impl RefUnwindSafe for ShadowState
impl Send for ShadowState
impl Sync for ShadowState
impl Unpin for ShadowState
impl UnsafeUnpin for ShadowState
impl UnwindSafe for ShadowState
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