Struct dns_lookup::LookupError
source · pub struct LookupError { /* private fields */ }
Expand description
Struct that stores a lookup error from getaddrinfo
or getnameinfo
. Can automatically be coerced to an io::Error using ?
.
Implementations§
source§impl LookupError
impl LookupError
sourcepub fn match_gai_error(err: i32) -> Result<(), Self>
pub fn match_gai_error(err: i32) -> Result<(), Self>
Match a gai
error, returning Ok() if it’s
0
. Otherwise return Err(LookupError) with
the specific error details.
sourcepub fn new(err: i32) -> Self
pub fn new(err: i32) -> Self
Create a new LookupError from a gai
error,
returned by getaddrinfo
and getnameinfo
.
sourcepub fn kind(&self) -> LookupErrorKind
pub fn kind(&self) -> LookupErrorKind
Get the error kind explicitly. If this is an io::Error, use From/Into to convert it.
Trait Implementations§
source§impl Debug for LookupError
impl Debug for LookupError
source§impl From<Error> for LookupError
impl From<Error> for LookupError
source§fn from(err: Error) -> LookupError
fn from(err: Error) -> LookupError
Converts to this type from the input type.
source§impl From<LookupError> for Error
impl From<LookupError> for Error
source§fn from(err: LookupError) -> Error
fn from(err: LookupError) -> Error
Converts to this type from the input type.
source§impl From<NulError> for LookupError
impl From<NulError> for LookupError
source§fn from(err: NulError) -> LookupError
fn from(err: NulError) -> LookupError
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for LookupError
impl Send for LookupError
impl Sync for LookupError
impl Unpin for LookupError
impl !UnwindSafe for LookupError
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