pub struct DecoderResult<'a> { /* private fields */ }Expand description
The restored original shards from a decode that ran (an original was missing).
Decoder::decode returns None instead when every original shard was already provided, since
there is nothing to reconstruct.
Implementations§
Source§impl DecoderResult<'_>
impl DecoderResult<'_>
Sourcepub fn original(&self, index: usize) -> Option<&[u8]>
pub fn original(&self, index: usize) -> Option<&[u8]>
Returns restored original shard with given index
or None if given index doesn’t correspond to
a missing original shard.
Sourcepub const fn original_iter(&self) -> Originals<'_> ⓘ
pub const fn original_iter(&self) -> Originals<'_> ⓘ
Returns iterator over all restored original shards and their indexes, ordered by indexes.
Trait Implementations§
Source§impl Drop for DecoderResult<'_>
impl Drop for DecoderResult<'_>
Auto Trait Implementations§
impl<'a> !UnwindSafe for DecoderResult<'a>
impl<'a> Freeze for DecoderResult<'a>
impl<'a> RefUnwindSafe for DecoderResult<'a>
impl<'a> Send for DecoderResult<'a>
impl<'a> Sync for DecoderResult<'a>
impl<'a> Unpin for DecoderResult<'a>
impl<'a> UnsafeUnpin for DecoderResult<'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