Struct c_ares::HostResults
source · pub struct HostResults<'a> { /* private fields */ }
Expand description
The result of a successful host lookup.
Implementations§
source§impl<'a> HostResults<'a>
impl<'a> HostResults<'a>
sourcepub fn hostname(self) -> &'a CStr
pub fn hostname(self) -> &'a CStr
Returns the hostname from this HostResults
.
In practice this is very likely to be a valid UTF-8 string, but the underlying c-ares
library does not guarantee this - so we leave it to users to decide whether they prefer a
fallible conversion, a lossy conversion, or something else altogether.
sourcepub fn addresses(self) -> HostAddressResultsIter<'a> ⓘ
pub fn addresses(self) -> HostAddressResultsIter<'a> ⓘ
Returns an iterator over the IpAddr
values in this HostResults
.
sourcepub fn aliases(self) -> HostAliasResultsIter<'a> ⓘ
pub fn aliases(self) -> HostAliasResultsIter<'a> ⓘ
Returns an iterator over the host aliases in this HostResults
.
Trait Implementations§
source§impl<'a> Clone for HostResults<'a>
impl<'a> Clone for HostResults<'a>
source§fn clone(&self) -> HostResults<'a>
fn clone(&self) -> HostResults<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Display for HostResults<'a>
impl<'a> Display for HostResults<'a>
impl<'a> Copy for HostResults<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for HostResults<'a>
impl<'a> Send for HostResults<'a>
impl<'a> Sync for HostResults<'a>
impl<'a> Unpin for HostResults<'a>
impl<'a> UnwindSafe for HostResults<'a>
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