#[non_exhaustive]pub enum LabelError {
Show 13 variants
WrongKind(Kind),
MalformedNamespace,
MalformedValue,
MalformedEventTarget,
MalformedPubkeyTarget,
MalformedAddressTarget,
MalformedUrlTarget,
MalformedTopicTarget,
InvalidEventId(EventIdError),
InvalidPublicKey(PublicKeyError),
InvalidCoordinate(CoordinateError),
InvalidUrl(UrlError),
InvalidRelayUrl(RelayUrlError),
}Expand description
Errors raised by Label::from_event and labels_from_tags.
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 kind: 1985.
MalformedNamespace
An L tag had no namespace value.
MalformedValue
An l tag had no value column.
MalformedEventTarget
An e target tag had no event id column.
MalformedPubkeyTarget
A p target tag had no pubkey column.
MalformedAddressTarget
An a target tag had no coordinate column.
MalformedUrlTarget
An r target tag had no URL column.
MalformedTopicTarget
A t target tag had no topic column.
InvalidEventId(EventIdError)
The e event id could not be parsed.
InvalidPublicKey(PublicKeyError)
The p pubkey could not be parsed.
InvalidCoordinate(CoordinateError)
The a coordinate could not be parsed.
InvalidUrl(UrlError)
The r URL could not be parsed.
InvalidRelayUrl(RelayUrlError)
A relay hint URL could not be parsed.
Trait Implementations§
Source§impl Debug for LabelError
impl Debug for LabelError
Source§impl Display for LabelError
impl Display for LabelError
Source§impl Error for LabelError
impl Error for LabelError
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 LabelError
impl From<CoordinateError> for LabelError
Source§fn from(source: CoordinateError) -> Self
fn from(source: CoordinateError) -> Self
Converts to this type from the input type.
Source§impl From<EventIdError> for LabelError
impl From<EventIdError> for LabelError
Source§fn from(source: EventIdError) -> Self
fn from(source: EventIdError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for LabelError
impl From<PublicKeyError> for LabelError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<RelayUrlError> for LabelError
impl From<RelayUrlError> for LabelError
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 LabelError
impl RefUnwindSafe for LabelError
impl Send for LabelError
impl Sync for LabelError
impl Unpin for LabelError
impl UnsafeUnpin for LabelError
impl UnwindSafe for LabelError
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