#[non_exhaustive]pub enum RelayDiscoveryError {
WrongKind(Kind),
MissingIdentifier,
InvalidNip(String),
InvalidAcceptedKind(String),
InvalidRtt(String),
InvalidFrequency(String),
MalformedTimeout,
InvalidTimeout(String),
}Expand description
Errors raised by NIP-66 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 did not match the expected NIP-66 kind.
MissingIdentifier
d tag is absent on a 30166 event.
InvalidNip(String)
N tag value could not be parsed as a u16.
InvalidAcceptedKind(String)
k tag value could not be parsed as a u16.
InvalidRtt(String)
rtt-* value could not be parsed as a u64.
InvalidFrequency(String)
frequency value could not be parsed as a u64.
MalformedTimeout
timeout tag is missing required columns.
InvalidTimeout(String)
timeout tag value could not be parsed as a u64.
Trait Implementations§
Source§impl Debug for RelayDiscoveryError
impl Debug for RelayDiscoveryError
Source§impl Display for RelayDiscoveryError
impl Display for RelayDiscoveryError
Source§impl Error for RelayDiscoveryError
impl Error for RelayDiscoveryError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for RelayDiscoveryError
impl RefUnwindSafe for RelayDiscoveryError
impl Send for RelayDiscoveryError
impl Sync for RelayDiscoveryError
impl Unpin for RelayDiscoveryError
impl UnsafeUnpin for RelayDiscoveryError
impl UnwindSafe for RelayDiscoveryError
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