[][src]Struct dns_lookup::LookupError

pub struct LookupError { /* fields omitted */ }

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]

impl From<Error> for LookupError[src]

impl From<NulError> for 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]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]