#[non_exhaustive]pub enum HighlightError {
WrongKind(Kind),
MalformedEventSource,
MalformedAddressSource,
MalformedUrlSource,
MalformedAttribution,
InvalidEventId(EventIdError),
InvalidCoordinate(CoordinateError),
InvalidUrl(UrlError),
InvalidPublicKey(PublicKeyError),
InvalidRelayUrl(RelayUrlError),
}Expand description
Errors raised by Highlight::from_event.
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: 9802.
MalformedEventSource
e source tag is missing its event id column.
MalformedAddressSource
a source tag is missing its coordinate column.
MalformedUrlSource
r source tag is missing its URL column.
MalformedAttribution
p attribution tag is missing its pubkey column.
InvalidEventId(EventIdError)
Event id parser error.
InvalidCoordinate(CoordinateError)
Coordinate parser error.
InvalidUrl(UrlError)
URL parser error.
InvalidPublicKey(PublicKeyError)
Pubkey parser error.
InvalidRelayUrl(RelayUrlError)
Relay URL parser error.
Trait Implementations§
Source§impl Debug for HighlightError
impl Debug for HighlightError
Source§impl Display for HighlightError
impl Display for HighlightError
Source§impl Error for HighlightError
impl Error for HighlightError
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 HighlightError
impl From<CoordinateError> for HighlightError
Source§fn from(source: CoordinateError) -> Self
fn from(source: CoordinateError) -> Self
Converts to this type from the input type.
Source§impl From<EventIdError> for HighlightError
impl From<EventIdError> for HighlightError
Source§fn from(source: EventIdError) -> Self
fn from(source: EventIdError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for HighlightError
impl From<PublicKeyError> for HighlightError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<RelayUrlError> for HighlightError
impl From<RelayUrlError> for HighlightError
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 HighlightError
impl RefUnwindSafe for HighlightError
impl Send for HighlightError
impl Sync for HighlightError
impl Unpin for HighlightError
impl UnsafeUnpin for HighlightError
impl UnwindSafe for HighlightError
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