Enum libp2p_dns::ResolveErrorKind
source · [−]pub enum ResolveErrorKind {
Message(&'static str),
Msg(String),
NoRecordsFound {
query: Query,
soa: Option<SOA>,
negative_ttl: Option<u32>,
response_code: ResponseCode,
trusted: bool,
},
Io(Error),
Proto(ProtoError),
Timeout,
}
Expand description
The error kind for errors that get returned in the crate
Variants
Message(&'static str)
An error with an arbitrary message, referenced as &’static str
Msg(String)
An error with an arbitrary message, stored as String
NoRecordsFound
Fields
soa: Option<SOA>
If an SOA is present, then this is an authoritative response.
negative_ttl: Option<u32>
negative ttl, as determined from DnsResponse::negative_ttl this will only be present if the SOA was also present.
response_code: ResponseCode
ResponseCode, if NXDOMAIN
, the domain does not exist (and no other types).
If NoError
, then the domain exists but there exist either other types at the same label, or subzones of that label.
trusted: bool
If we trust NXDOMAIN
errors from this server
No records were found for a query
Io(Error)
An error got returned from IO
Proto(ProtoError)
An error got returned by the trust-dns-proto crate
Timeout
A request timed out
Trait Implementations
sourceimpl Clone for ResolveErrorKind
impl Clone for ResolveErrorKind
sourcepub fn clone(&self) -> ResolveErrorKind
pub fn clone(&self) -> ResolveErrorKind
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ResolveErrorKind
impl Debug for ResolveErrorKind
sourceimpl Display for ResolveErrorKind
impl Display for ResolveErrorKind
sourceimpl Error for ResolveErrorKind
impl Error for ResolveErrorKind
sourcepub fn source(&self) -> Option<&(dyn Error + 'static)>
pub fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<Error> for ResolveErrorKind
impl From<Error> for ResolveErrorKind
sourcepub fn from(source: Error) -> ResolveErrorKind
pub fn from(source: Error) -> ResolveErrorKind
Performs the conversion.
sourceimpl From<ProtoError> for ResolveErrorKind
impl From<ProtoError> for ResolveErrorKind
sourcepub fn from(source: ProtoError) -> ResolveErrorKind
pub fn from(source: ProtoError) -> ResolveErrorKind
Performs the conversion.
sourceimpl From<ResolveErrorKind> for ResolveError
impl From<ResolveErrorKind> for ResolveError
sourcepub fn from(kind: ResolveErrorKind) -> ResolveError
pub fn from(kind: ResolveErrorKind) -> ResolveError
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for ResolveErrorKind
impl Send for ResolveErrorKind
impl Sync for ResolveErrorKind
impl Unpin for ResolveErrorKind
impl UnwindSafe for ResolveErrorKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more