pub enum Error {
Show 25 variants
ENODATA = 1,
EFORMERR = 2,
ESERVFAIL = 3,
ENOTFOUND = 4,
ENOTIMP = 5,
EREFUSED = 6,
EBADQUERY = 7,
EBADNAME = 8,
EBADFAMILY = 9,
EBADRESP = 10,
ECONNREFUSED = 11,
ETIMEOUT = 12,
EOF = 13,
EFILE = 14,
ENOMEM = 15,
EDESTRUCTION = 16,
EBADSTR = 17,
EBADFLAGS = 18,
ENONAME = 19,
EBADHINTS = 20,
ENOTINITIALIZED = 21,
ELOADIPHLPAPI = 22,
EADDRGETNETWORKPARAMS = 23,
ECANCELLED = 24,
UNKNOWN = 25,
}
Expand description
Error codes that the library might return.
Variants§
ENODATA = 1
DNS server returned answer with no data.
EFORMERR = 2
DNS server claims query was misformatted.
ESERVFAIL = 3
DNS server returned general failure.
ENOTFOUND = 4
Domain name not found.
ENOTIMP = 5
DNS server does not implement requested operation.
EREFUSED = 6
DNS server refused query.
EBADQUERY = 7
Misformatted DNS query.
EBADNAME = 8
Misformatted domain name.
EBADFAMILY = 9
Unsupported address family.
EBADRESP = 10
Misformatted DNS reply.
ECONNREFUSED = 11
Could not contact DNS servers.
ETIMEOUT = 12
Timeout while contacting DNS servers.
EOF = 13
End of file.
EFILE = 14
Error reading file.
ENOMEM = 15
Out of memory.
EDESTRUCTION = 16
Channel is being destroyed.
EBADSTR = 17
Misformatted string.
EBADFLAGS = 18
Illegal flags specified.
ENONAME = 19
Given hostname is not numeric.
EBADHINTS = 20
Illegal hints flags specified.
ENOTINITIALIZED = 21
c-ares library initialization not yet performed.
ELOADIPHLPAPI = 22
Error loading iphlpapi.dll.
EADDRGETNETWORKPARAMS = 23
Could not find GetNetworkParams function.
ECANCELLED = 24
DNS query cancelled.
UNKNOWN = 25
Unknown error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Source§impl Ord for Error
impl Ord for Error
Source§impl PartialOrd for Error
impl PartialOrd for Error
impl Copy for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more