pub struct DecoderState {
pub k_source: u32,
pub symbol_size: u32,
pub seed: u64,
/* private fields */
}Expand description
Per-changeset decoder state, created on first packet.
Fields§
§k_source: u32Number of source symbols expected.
symbol_size: u32Symbol size in bytes (inferred from first packet).
seed: u64Deterministic seed derived from changeset_id.
Implementations§
Source§impl DecoderState
impl DecoderState
Sourcepub fn received_count(&self) -> u32
pub fn received_count(&self) -> u32
Number of unique symbols received.
Sourcepub fn ready_to_decode(&self) -> bool
pub fn ready_to_decode(&self) -> bool
Whether enough symbols have been collected to attempt decode.
Sourcepub fn source_symbol_count(&self) -> u32
pub fn source_symbol_count(&self) -> u32
Number of collected source symbols (isi < k_source).
Sourcepub fn has_repair_symbols(&self) -> bool
pub fn has_repair_symbols(&self) -> bool
Whether any collected symbol is a repair symbol (isi >= k_source).
Sourcepub fn sorted_isis(&self) -> Vec<u32>
pub fn sorted_isis(&self) -> Vec<u32>
Sorted unique ISIs of all collected symbols.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DecoderState
impl RefUnwindSafe for DecoderState
impl Send for DecoderState
impl Sync for DecoderState
impl Unpin for DecoderState
impl UnsafeUnpin for DecoderState
impl UnwindSafe for DecoderState
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).