pub enum HashError {
BadProtocol,
BadHex(FromHexError),
}Expand description
An error that can occur when converting a hash value from a string. The error can be caused by a bad protocol or a bad hex encoding.
Variants§
BadProtocol
The string does not start with the expected protocol prefix
(e.g. "blake3:").
BadHex(FromHexError)
The hex portion could not be decoded.
Trait Implementations§
Source§impl From<FromHexError> for HashError
impl From<FromHexError> for HashError
Source§fn from(value: FromHexError) -> Self
fn from(value: FromHexError) -> Self
Converts to this type from the input type.
impl Copy for HashError
impl StructuralPartialEq for HashError
Auto Trait Implementations§
impl Freeze for HashError
impl RefUnwindSafe for HashError
impl Send for HashError
impl Sync for HashError
impl Unpin for HashError
impl UnsafeUnpin for HashError
impl UnwindSafe for HashError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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