#[non_exhaustive]pub enum CalendarError {
Show 18 variants
WrongKind(Kind),
MissingIdentifier,
MissingTitle,
MissingStart,
MissingRsvpCoordinate,
MissingRsvpStatus,
InvalidRsvpStatus(String),
InvalidFreeBusy(String),
MalformedParticipant,
MalformedAddress,
MalformedImage,
InvalidCalendarDate(CalendarDateError),
InvalidTimestamp(TimestampError),
InvalidPublicKey(PublicKeyError),
InvalidCoordinate(CoordinateError),
InvalidEventId(EventIdError),
InvalidUrl(UrlError),
InvalidRelayUrl(RelayUrlError),
}Expand description
Errors raised by NIP-52 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)
Unexpected event kind.
MissingIdentifier
d tag is absent.
MissingTitle
title tag is absent.
MissingStart
start tag is absent.
MissingRsvpCoordinate
RSVP a tag is absent.
MissingRsvpStatus
RSVP status tag is absent.
InvalidRsvpStatus(String)
status token is not one of the spec-defined values.
InvalidFreeBusy(String)
fb token is not free or busy.
MalformedParticipant
p tag is missing the pubkey column.
MalformedAddress
a tag is missing the coordinate column.
MalformedImage
image tag is missing the URL column.
InvalidCalendarDate(CalendarDateError)
Wrapped calendar-date parser error.
InvalidTimestamp(TimestampError)
Wrapped timestamp parser error.
InvalidPublicKey(PublicKeyError)
Wrapped pubkey parser error.
InvalidCoordinate(CoordinateError)
Wrapped coordinate parser error.
InvalidEventId(EventIdError)
Wrapped event-id parser error.
InvalidUrl(UrlError)
Wrapped URL parser error.
InvalidRelayUrl(RelayUrlError)
Wrapped relay-URL parser error.
Trait Implementations§
Source§impl Debug for CalendarError
impl Debug for CalendarError
Source§impl Display for CalendarError
impl Display for CalendarError
Source§impl Error for CalendarError
impl Error for CalendarError
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<CalendarDateError> for CalendarError
impl From<CalendarDateError> for CalendarError
Source§fn from(source: CalendarDateError) -> Self
fn from(source: CalendarDateError) -> Self
Converts to this type from the input type.
Source§impl From<CoordinateError> for CalendarError
impl From<CoordinateError> for CalendarError
Source§fn from(source: CoordinateError) -> Self
fn from(source: CoordinateError) -> Self
Converts to this type from the input type.
Source§impl From<EventIdError> for CalendarError
impl From<EventIdError> for CalendarError
Source§fn from(source: EventIdError) -> Self
fn from(source: EventIdError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for CalendarError
impl From<PublicKeyError> for CalendarError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<RelayUrlError> for CalendarError
impl From<RelayUrlError> for CalendarError
Source§fn from(source: RelayUrlError) -> Self
fn from(source: RelayUrlError) -> Self
Converts to this type from the input type.
Source§impl From<TimestampError> for CalendarError
impl From<TimestampError> for CalendarError
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 CalendarError
impl RefUnwindSafe for CalendarError
impl Send for CalendarError
impl Sync for CalendarError
impl Unpin for CalendarError
impl UnsafeUnpin for CalendarError
impl UnwindSafe for CalendarError
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