pub enum HashParseError {
InvalidHex(String),
WrongLength {
expected: usize,
got: usize,
},
}Expand description
Errors that can occur when parsing a Hash from a string or byte slice.
Variants§
InvalidHex(String)
The input string is not valid hexadecimal.
WrongLength
The decoded bytes are not exactly 32 bytes.
Trait Implementations§
Source§impl Clone for HashParseError
impl Clone for HashParseError
Source§fn clone(&self) -> HashParseError
fn clone(&self) -> HashParseError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HashParseError
impl Debug for HashParseError
Source§impl Display for HashParseError
impl Display for HashParseError
Source§impl Error for HashParseError
impl Error for HashParseError
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 HashParseError
impl PartialEq for HashParseError
impl Eq for HashParseError
impl StructuralPartialEq for HashParseError
Auto Trait Implementations§
impl Freeze for HashParseError
impl RefUnwindSafe for HashParseError
impl Send for HashParseError
impl Sync for HashParseError
impl Unpin for HashParseError
impl UnsafeUnpin for HashParseError
impl UnwindSafe for HashParseError
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