pub enum EventHashParseError {
InvalidLength(usize),
InvalidChar {
position: usize,
ch: char,
},
}Expand description
Error returned when parsing an EventHash from a hex string fails.
§Args
InvalidLength— the input was not exactly 40 hex charactersInvalidChar— the input contained a non-hex character
§Usage
use auths_core::witness::EventHash;
use std::str::FromStr;
assert!(EventHash::from_str("not-hex").is_err());Variants§
InvalidLength(usize)
The input string was not exactly 40 hex characters.
InvalidChar
The input contained a non-hex character at the given position.
Trait Implementations§
Source§impl Debug for EventHashParseError
impl Debug for EventHashParseError
Source§impl Display for EventHashParseError
impl Display for EventHashParseError
Source§impl Error for EventHashParseError
impl Error for EventHashParseError
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 EventHashParseError
impl PartialEq for EventHashParseError
impl StructuralPartialEq for EventHashParseError
Auto Trait Implementations§
impl Freeze for EventHashParseError
impl RefUnwindSafe for EventHashParseError
impl Send for EventHashParseError
impl Sync for EventHashParseError
impl Unpin for EventHashParseError
impl UnsafeUnpin for EventHashParseError
impl UnwindSafe for EventHashParseError
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