[−][src]Struct dns_lookup::LookupError
Struct that stores a lookup error from getaddrinfo
or getnameinfo
. Can automatically be coerced to an io::Error using ?
.
Methods
impl LookupError
[src]
pub fn match_gai_error(err: i32) -> Result<(), Self>
[src]
Match a gai
error, returning Ok() if it's
0
. Otherwise return Err(LookupError) with
the specific error details.
pub fn new(err: i32) -> Self
[src]
Create a new LookupError from a gai
error,
returned by getaddrinfo
and getnameinfo
.
pub fn kind(&self) -> LookupErrorKind
[src]
Get the error kind explicitly. If this is an io::Error, use From/Into to convert it.
pub fn error_num(&self) -> i32
[src]
Get the actual error number. This can be used to find non-standard return codes from some implementations (be careful of portability here).
Trait Implementations
impl From<LookupError> for Error
[src]
fn from(err: LookupError) -> Error
[src]
impl From<Error> for LookupError
[src]
fn from(err: Error) -> LookupError
[src]
impl From<NulError> for LookupError
[src]
fn from(err: NulError) -> LookupError
[src]
impl Debug for LookupError
[src]
Auto Trait Implementations
impl Send for LookupError
impl Sync for LookupError
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,