#[non_exhaustive]pub enum PollError {
WrongKind(Kind),
MalformedOption,
MissingPollReference,
MalformedResponse,
InvalidRelayUrl(RelayUrlError),
InvalidEventId(EventIdError),
InvalidTimestamp(TimestampError),
}Expand description
Errors raised while parsing NIP-88 events.
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 1068 / 1018.
MalformedOption
option tag is missing the id or label column.
MissingPollReference
e tag missing on a poll response.
MalformedResponse
response tag missing the option-id column.
InvalidRelayUrl(RelayUrlError)
Wrapped relay-URL parser error.
InvalidEventId(EventIdError)
Wrapped event-id parser error.
InvalidTimestamp(TimestampError)
Wrapped timestamp parser error.
Trait Implementations§
Source§impl Error for PollError
impl Error for PollError
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<EventIdError> for PollError
impl From<EventIdError> for PollError
Source§fn from(source: EventIdError) -> Self
fn from(source: EventIdError) -> Self
Converts to this type from the input type.
Source§impl From<RelayUrlError> for PollError
impl From<RelayUrlError> for PollError
Source§fn from(source: RelayUrlError) -> Self
fn from(source: RelayUrlError) -> Self
Converts to this type from the input type.
Source§impl From<TimestampError> for PollError
impl From<TimestampError> for PollError
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 PollError
impl RefUnwindSafe for PollError
impl Send for PollError
impl Sync for PollError
impl Unpin for PollError
impl UnsafeUnpin for PollError
impl UnwindSafe for PollError
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