#[non_exhaustive]pub enum ListingError {
Show 14 variants
WrongKind(Kind),
MissingIdentifier,
WrongPriceTag,
MalformedPrice,
WrongImageTag,
MalformedImage,
MalformedEventRef,
MalformedAddressRef,
InvalidEventId(EventIdError),
InvalidCoordinate(CoordinateError),
InvalidRelayUrl(RelayUrlError),
InvalidUrl(UrlError),
InvalidDim(ImageError),
InvalidTimestamp(TimestampError),
}Expand description
Errors raised by NIP-99 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 neither kind: 30402 nor kind: 30403.
MissingIdentifier
d tag is absent.
WrongPriceTag
price tag head was not price.
MalformedPrice
price tag is missing the amount or currency column.
WrongImageTag
image tag head was not image.
MalformedImage
image tag is missing the URL column.
MalformedEventRef
e reference tag is missing the event id column.
MalformedAddressRef
a reference tag is missing the coordinate column.
InvalidEventId(EventIdError)
Wrapped event-id parser error.
InvalidCoordinate(CoordinateError)
Wrapped coordinate parser error.
InvalidRelayUrl(RelayUrlError)
Wrapped relay-url parser error.
InvalidUrl(UrlError)
Wrapped URL parser error.
InvalidDim(ImageError)
Wrapped image-dim parser error.
InvalidTimestamp(TimestampError)
Wrapped published_at timestamp parser error.
Trait Implementations§
Source§impl Debug for ListingError
impl Debug for ListingError
Source§impl Display for ListingError
impl Display for ListingError
Source§impl Error for ListingError
impl Error for ListingError
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 ListingError
impl From<CoordinateError> for ListingError
Source§fn from(source: CoordinateError) -> Self
fn from(source: CoordinateError) -> Self
Converts to this type from the input type.
Source§impl From<EventIdError> for ListingError
impl From<EventIdError> for ListingError
Source§fn from(source: EventIdError) -> Self
fn from(source: EventIdError) -> Self
Converts to this type from the input type.
Source§impl From<ImageError> for ListingError
impl From<ImageError> for ListingError
Source§fn from(source: ImageError) -> Self
fn from(source: ImageError) -> Self
Converts to this type from the input type.
Source§impl From<RelayUrlError> for ListingError
impl From<RelayUrlError> for ListingError
Source§fn from(source: RelayUrlError) -> Self
fn from(source: RelayUrlError) -> Self
Converts to this type from the input type.
Source§impl From<TimestampError> for ListingError
impl From<TimestampError> for ListingError
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 ListingError
impl RefUnwindSafe for ListingError
impl Send for ListingError
impl Sync for ListingError
impl Unpin for ListingError
impl UnsafeUnpin for ListingError
impl UnwindSafe for ListingError
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