pub struct EncodedState {
pub params: ObjectParams,
pub symbols: Vec<Symbol>,
pub source_count: u16,
pub repair_count: u16,
pub original_size: usize,
pub encoded_at: Time,
}Expand description
Result of encoding a region snapshot.
Fields§
§params: ObjectParamsObject parameters for this encoding.
symbols: Vec<Symbol>All generated symbols (source + repair).
source_count: u16Number of source symbols.
repair_count: u16Number of repair symbols.
original_size: usizeOriginal snapshot size in bytes.
encoded_at: TimeEncoding timestamp.
Implementations§
Source§impl EncodedState
impl EncodedState
Sourcepub fn source_symbols(&self) -> impl Iterator<Item = &Symbol>
pub fn source_symbols(&self) -> impl Iterator<Item = &Symbol>
Returns an iterator over source symbols only.
Sourcepub fn repair_symbols(&self) -> impl Iterator<Item = &Symbol>
pub fn repair_symbols(&self) -> impl Iterator<Item = &Symbol>
Returns an iterator over repair symbols only.
Sourcepub fn min_symbols_for_decode(&self) -> u16
pub fn min_symbols_for_decode(&self) -> u16
Returns the minimum symbols needed for decoding.
Sourcepub fn redundancy_factor(&self) -> f32
pub fn redundancy_factor(&self) -> f32
Returns total redundancy factor.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EncodedState
impl RefUnwindSafe for EncodedState
impl Send for EncodedState
impl Sync for EncodedState
impl Unpin for EncodedState
impl UnsafeUnpin for EncodedState
impl UnwindSafe for EncodedState
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: 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).