#[non_exhaustive]pub enum HandlerError {
WrongKind(Kind),
WrongTag,
MissingIdentifier,
InvalidRecommendedKind(String),
InvalidKind(String),
MalformedKindTag,
MalformedAddressTag,
MalformedClientTag,
MalformedHandlerPlatform,
InvalidCoordinate(CoordinateError),
InvalidRelayUrl(RelayUrlError),
}Expand description
Errors raised by NIP-89 parsers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
WrongKind(Kind)
Event kind did not match the expected NIP-89 kind.
WrongTag
Tag head did not match the expected NIP-89 tag.
MissingIdentifier
d tag is absent.
InvalidRecommendedKind(String)
d-tag value on a kind: 31989 event is not a decimal u16.
InvalidKind(String)
k tag value on a kind: 31990 event is not a decimal u16.
MalformedKindTag
k tag column 1 is absent.
MalformedAddressTag
a tag column 1 is absent.
MalformedClientTag
client tag column 1 is absent.
MalformedHandlerPlatform
Handler platform tag missing URL template.
InvalidCoordinate(CoordinateError)
Coordinate failed to parse.
InvalidRelayUrl(RelayUrlError)
Relay URL failed to parse.
Trait Implementations§
Source§impl Debug for HandlerError
impl Debug for HandlerError
Source§impl Display for HandlerError
impl Display for HandlerError
Source§impl Error for HandlerError
impl Error for HandlerError
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 From<CoordinateError> for HandlerError
impl From<CoordinateError> for HandlerError
Source§fn from(source: CoordinateError) -> Self
fn from(source: CoordinateError) -> Self
Converts to this type from the input type.
Source§impl From<RelayUrlError> for HandlerError
impl From<RelayUrlError> for HandlerError
Source§fn from(source: RelayUrlError) -> Self
fn from(source: RelayUrlError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HandlerError
impl RefUnwindSafe for HandlerError
impl Send for HandlerError
impl Sync for HandlerError
impl Unpin for HandlerError
impl UnsafeUnpin for HandlerError
impl UnwindSafe for HandlerError
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