pub enum SeedDecodeError {
InvalidHex(FromHexError),
WrongLength {
expected: usize,
got: usize,
},
}Expand description
Errors from hex seed decoding.
Usage:
ⓘ
match decode_seed_hex("bad") {
Err(SeedDecodeError::InvalidHex(_)) => { /* not valid hex */ }
Err(SeedDecodeError::WrongLength { .. }) => { /* not 32 bytes */ }
Ok(seed) => { /* use seed */ }
}Variants§
InvalidHex(FromHexError)
The input string is not valid hexadecimal.
WrongLength
The decoded bytes are not exactly 32 bytes.
Trait Implementations§
Source§impl Debug for SeedDecodeError
impl Debug for SeedDecodeError
Source§impl Display for SeedDecodeError
impl Display for SeedDecodeError
Source§impl Error for SeedDecodeError
impl Error for SeedDecodeError
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()
Auto Trait Implementations§
impl Freeze for SeedDecodeError
impl RefUnwindSafe for SeedDecodeError
impl Send for SeedDecodeError
impl Sync for SeedDecodeError
impl Unpin for SeedDecodeError
impl UnsafeUnpin for SeedDecodeError
impl UnwindSafe for SeedDecodeError
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