pub struct EncoderResult<'a> { /* private fields */ }Expand description
Result of encoding. Contains the generated recovery shards.
This struct is created by Encoder::encode
and RateEncoder::encode.
Implementations§
Source§impl EncoderResult<'_>
impl EncoderResult<'_>
Sourcepub fn recovery(&self, index: usize) -> Option<&[u8]>
pub fn recovery(&self, index: usize) -> Option<&[u8]>
Returns recovery shard with given index
or None if index >= recovery_count.
Recovery shards have indexes 0..recovery_count
and these same indexes must be used when decoding.
Sourcepub const fn recovery_iter(&self) -> Recovery<'_> ⓘ
pub const fn recovery_iter(&self) -> Recovery<'_> ⓘ
Returns iterator over all recovery shards ordered by their indexes.
Recovery shards have indexes 0..recovery_count
and these same indexes must be used when decoding.
Trait Implementations§
Source§impl Drop for EncoderResult<'_>
impl Drop for EncoderResult<'_>
Auto Trait Implementations§
impl<'a> !UnwindSafe for EncoderResult<'a>
impl<'a> Freeze for EncoderResult<'a>
impl<'a> RefUnwindSafe for EncoderResult<'a>
impl<'a> Send for EncoderResult<'a>
impl<'a> Sync for EncoderResult<'a>
impl<'a> Unpin for EncoderResult<'a>
impl<'a> UnsafeUnpin for EncoderResult<'a>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more