pub enum CidError {
InvalidCidCodec(u64),
InvalidMultihashLength(usize),
InvalidMultihashCode(u64, u64),
InvalidDataFormat(String),
InvalidCid(String),
}Expand description
Error returned when trying to compute new or parse existing CID. Note that errors here can be
specific to particular Block impl, and don’t necessarily indicate invalid CID in general.
Variants§
InvalidCidCodec(u64)
Coded specified in CID is not supported in this context
InvalidMultihashLength(usize)
CID’s multihash length is different from expected
InvalidMultihashCode(u64, u64)
Encountered multihash code is not supported in this context
InvalidDataFormat(String)
CID could not be computed for the provided data due to some constraint violation
InvalidCid(String)
CID is well-formed but contains invalid data
Trait Implementations§
Source§impl Error for CidError
impl Error for CidError
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()
impl StructuralPartialEq for CidError
Auto Trait Implementations§
impl Freeze for CidError
impl RefUnwindSafe for CidError
impl Send for CidError
impl Sync for CidError
impl Unpin for CidError
impl UnwindSafe for CidError
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