Enum bao_tree::io::AnyDecodeError
source · pub enum AnyDecodeError {
NotFound,
ParentNotFound(TreeNode),
LeafNotFound(ChunkNum),
ParentHashMismatch(TreeNode),
LeafHashMismatch(ChunkNum),
Io(Error),
}
Expand description
Error when decoding from a reader, both when reading the size and after
This is an union of StartDecodeError
and DecodeError
for convenience.
Variants§
NotFound
We got an EOF when reading the size, indicating that the remote end does not have the blob
ParentNotFound(TreeNode)
We got an EOF while reading a parent hash pair, indicating that the remote end does not have the outboard
LeafNotFound(ChunkNum)
We got an EOF while reading a chunk, indicating that the remote end does not have the data
ParentHashMismatch(TreeNode)
The hash of a parent did not match the expected hash
LeafHashMismatch(ChunkNum)
The hash of a leaf did not match the expected hash
Io(Error)
There was an error reading from the underlying io
Trait Implementations§
source§impl Debug for AnyDecodeError
impl Debug for AnyDecodeError
source§impl Display for AnyDecodeError
impl Display for AnyDecodeError
source§impl Error for AnyDecodeError
impl Error for AnyDecodeError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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 From<AnyDecodeError> for Error
impl From<AnyDecodeError> for Error
source§fn from(e: AnyDecodeError) -> Self
fn from(e: AnyDecodeError) -> Self
Converts to this type from the input type.
source§impl From<DecodeError> for AnyDecodeError
impl From<DecodeError> for AnyDecodeError
source§fn from(e: DecodeError) -> Self
fn from(e: DecodeError) -> Self
Converts to this type from the input type.
source§impl From<StartDecodeError> for AnyDecodeError
impl From<StartDecodeError> for AnyDecodeError
source§fn from(e: StartDecodeError) -> Self
fn from(e: StartDecodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for AnyDecodeError
impl Send for AnyDecodeError
impl Sync for AnyDecodeError
impl Unpin for AnyDecodeError
impl !UnwindSafe for AnyDecodeError
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