pub enum FromWireError {
MissingField(&'static str),
WrongFieldType(&'static str),
ZeroChunkSize,
InconsistentChunkCount,
}Variants§
MissingField(&'static str)
WrongFieldType(&'static str)
ZeroChunkSize
chunk_size is 0. Never produced by create (its own doc
comment already requires a non-zero chunk_size), so this only
ever rejects a malicious/malformed wire manifest — accepting it
would panic downstream: [T]::chunks(0) (called from
verify’s own do_chunk) panics unconditionally on a zero
chunk size, even for empty content.
InconsistentChunkCount
chunk_count doesn’t match the actual number of entries in the
chunks list. Never produced by create (chunk_count is
always chunk_infos.len()), so this only ever rejects a
malicious/malformed wire manifest — accepting it would let a
caller iterate 0..chunk_count past the real end of chunks
and panic on the resulting None from chunk_mcid.
Trait Implementations§
Source§impl Debug for FromWireError
impl Debug for FromWireError
Source§impl Display for FromWireError
impl Display for FromWireError
impl Eq for FromWireError
Source§impl Error for FromWireError
impl Error for FromWireError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for FromWireError
impl PartialEq for FromWireError
impl StructuralPartialEq for FromWireError
Auto Trait Implementations§
impl Freeze for FromWireError
impl RefUnwindSafe for FromWireError
impl Send for FromWireError
impl Sync for FromWireError
impl Unpin for FromWireError
impl UnsafeUnpin for FromWireError
impl UnwindSafe for FromWireError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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