pub enum PkarrError {
Dns(SimpleDnsError),
SignPacket(SignedPacketBuildError),
Publish(PublishError),
Query(QueryError),
InvalidRecord(String),
}Expand description
Runtime errors produced while resolving or publishing PKARR records.
Variants§
Dns(SimpleDnsError)
Low-level DNS encoding/decoding failure.
SignPacket(SignedPacketBuildError)
Failed to construct or sign a PKARR DNS packet locally.
Publish(PublishError)
DHT publish operation failed (often transient).
Query(QueryError)
DHT query (lookup) failed (often transient).
InvalidRecord(String)
Record was present but malformed or missing required fields.
Implementations§
Source§impl PkarrError
impl PkarrError
Sourcepub const fn is_retryable(&self) -> bool
pub const fn is_retryable(&self) -> bool
Returns true if the error is from a DHT operation that might succeed by simply retrying.
Trait Implementations§
Source§impl Debug for PkarrError
impl Debug for PkarrError
Source§impl Display for PkarrError
impl Display for PkarrError
Source§impl Error for PkarrError
impl Error for PkarrError
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<PkarrError> for Error
impl From<PkarrError> for Error
Source§fn from(source: PkarrError) -> Self
fn from(source: PkarrError) -> Self
Converts to this type from the input type.
Source§impl From<PublishError> for PkarrError
impl From<PublishError> for PkarrError
Source§fn from(source: PublishError) -> Self
fn from(source: PublishError) -> Self
Converts to this type from the input type.
Source§impl From<QueryError> for PkarrError
impl From<QueryError> for PkarrError
Source§fn from(source: QueryError) -> Self
fn from(source: QueryError) -> Self
Converts to this type from the input type.
Source§impl From<SignedPacketBuildError> for PkarrError
impl From<SignedPacketBuildError> for PkarrError
Source§fn from(source: SignedPacketBuildError) -> Self
fn from(source: SignedPacketBuildError) -> Self
Converts to this type from the input type.
Source§impl From<SimpleDnsError> for PkarrError
impl From<SimpleDnsError> for PkarrError
Source§fn from(source: SimpleDnsError) -> Self
fn from(source: SimpleDnsError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PkarrError
impl RefUnwindSafe for PkarrError
impl Send for PkarrError
impl Sync for PkarrError
impl Unpin for PkarrError
impl UnwindSafe for PkarrError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.