#[non_exhaustive]pub enum WikiError {
WrongKind(Kind),
MissingIdentifier,
MissingTarget,
MissingMergePubkey,
MissingMergeSource,
MalformedAddressTag,
MalformedEventTag,
InvalidCoordinate(CoordinateError),
InvalidEventId(EventIdError),
InvalidRelayUrl(RelayUrlError),
InvalidPublicKey(PublicKeyError),
}Expand description
Errors raised by NIP-54 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)
The event was not a NIP-54 kind.
MissingIdentifier
d tag is absent.
MissingTarget
a target tag is absent.
MissingMergePubkey
Merge request p tag is absent.
MissingMergeSource
Merge request e tag with the source marker is absent.
MalformedAddressTag
a tag column 1 is absent.
MalformedEventTag
e tag column 1 is absent.
InvalidCoordinate(CoordinateError)
Wrapped coordinate parser error.
InvalidEventId(EventIdError)
Wrapped event-id parser error.
InvalidRelayUrl(RelayUrlError)
Wrapped relay-url parser error.
InvalidPublicKey(PublicKeyError)
Wrapped pubkey parser error.
Trait Implementations§
Source§impl Error for WikiError
impl Error for WikiError
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 WikiError
impl From<CoordinateError> for WikiError
Source§fn from(source: CoordinateError) -> Self
fn from(source: CoordinateError) -> Self
Converts to this type from the input type.
Source§impl From<EventIdError> for WikiError
impl From<EventIdError> for WikiError
Source§fn from(source: EventIdError) -> Self
fn from(source: EventIdError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for WikiError
impl From<PublicKeyError> for WikiError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<RelayUrlError> for WikiError
impl From<RelayUrlError> for WikiError
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 WikiError
impl RefUnwindSafe for WikiError
impl Send for WikiError
impl Sync for WikiError
impl Unpin for WikiError
impl UnsafeUnpin for WikiError
impl UnwindSafe for WikiError
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