#[non_exhaustive]pub enum LiveError {
WrongKind(Kind),
MissingIdentifier,
MissingAddress,
MalformedParticipant,
InvalidNumber {
tag: String,
value: String,
},
InvalidPublicKey(PublicKeyError),
InvalidRelayUrl(RelayUrlError),
InvalidUrl(UrlError),
InvalidTimestamp(TimestampError),
InvalidEventId(EventIdError),
InvalidCoordinate(CoordinateError),
}Expand description
Errors raised by NIP-53 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 is not one of the NIP-53 kinds.
MissingIdentifier
d tag is absent on an addressable kind.
MissingAddress
a tag is absent on a kind that requires it
(1311, 10312, 30313).
MalformedParticipant
p tag is missing the pubkey column.
InvalidNumber
Numeric tag (current_participants, total_participants,
starts, ends) failed to parse.
InvalidPublicKey(PublicKeyError)
Wrapped pubkey parser error.
InvalidRelayUrl(RelayUrlError)
Wrapped relay-URL parser error.
InvalidUrl(UrlError)
Wrapped URL parser error.
InvalidTimestamp(TimestampError)
Wrapped timestamp parser error.
InvalidEventId(EventIdError)
Wrapped event-id parser error.
InvalidCoordinate(CoordinateError)
Wrapped coordinate parser error.
Trait Implementations§
Source§impl Error for LiveError
impl Error for LiveError
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 LiveError
impl From<CoordinateError> for LiveError
Source§fn from(source: CoordinateError) -> Self
fn from(source: CoordinateError) -> Self
Converts to this type from the input type.
Source§impl From<EventIdError> for LiveError
impl From<EventIdError> for LiveError
Source§fn from(source: EventIdError) -> Self
fn from(source: EventIdError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for LiveError
impl From<PublicKeyError> for LiveError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<RelayUrlError> for LiveError
impl From<RelayUrlError> for LiveError
Source§fn from(source: RelayUrlError) -> Self
fn from(source: RelayUrlError) -> Self
Converts to this type from the input type.
Source§impl From<TimestampError> for LiveError
impl From<TimestampError> for LiveError
Source§fn from(source: TimestampError) -> Self
fn from(source: TimestampError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LiveError
impl RefUnwindSafe for LiveError
impl Send for LiveError
impl Sync for LiveError
impl Unpin for LiveError
impl UnsafeUnpin for LiveError
impl UnwindSafe for LiveError
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