Struct e_utils::dns::LookupError
source · [−]pub struct LookupError { /* private fields */ }Available on crate feature
dns only.Expand description
Struct that stores a lookup error from getaddrinfo
or getnameinfo. Can automatically be coerced to an io::Error using ?.
Implementations
sourceimpl 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
sourceimpl Debug for LookupError
impl Debug for LookupError
sourceimpl From<Error> for LookupError
impl From<Error> for LookupError
sourcefn from(err: Error) -> LookupError
fn from(err: Error) -> LookupError
Converts to this type from the input type.
sourceimpl From<LookupError> for Error
impl From<LookupError> for Error
sourcefn from(err: LookupError) -> Error
fn from(err: LookupError) -> Error
Converts to this type from the input type.
sourceimpl From<NulError> for LookupError
impl From<NulError> for LookupError
sourcefn 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
