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 the restored original shard with the given index, or None if index does not
correspond to a missing original shard.
Sourcepub const fn original_iter(&self) -> Originals<'_> ⓘ
pub const fn original_iter(&self) -> Originals<'_> ⓘ
Returns an iterator over all restored original shards and their indexes, ordered by index.
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