pub struct EncoderResult<'a> { /* private fields */ }
Expand description
Result of encoding. Contains the generated recovery shards.
This struct is created by ReedSolomonEncoder::encode
and RateEncoder::encode
.
Implementations§
Source§impl<'a> EncoderResult<'a>
impl<'a> EncoderResult<'a>
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 fn recovery_iter(&self) -> Recovery<'_> ⓘ
pub 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§
Auto Trait Implementations§
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> !UnwindSafe 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