Struct c_ares::CNameResults
source · pub struct CNameResults { /* private fields */ }
Expand description
The result of a successful CNAME lookup.
Implementations§
source§impl CNameResults
impl CNameResults
sourcepub fn parse_from(data: &[u8]) -> Result<CNameResults>
pub fn parse_from(data: &[u8]) -> Result<CNameResults>
Obtain a CNameResults
from the response to a CNAME lookup.
sourcepub fn hostname(&self) -> &CStr
pub fn hostname(&self) -> &CStr
Returns the hostname from this CNameResults
.
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 aliases(&self) -> HostAliasResultsIter<'_> ⓘ
pub fn aliases(&self) -> HostAliasResultsIter<'_> ⓘ
Returns an iterator over the host aliases in this CNameResults
.
Trait Implementations§
source§impl Debug for CNameResults
impl Debug for CNameResults
Auto Trait Implementations§
impl RefUnwindSafe for CNameResults
impl Send for CNameResults
impl Sync for CNameResults
impl Unpin for CNameResults
impl UnwindSafe for CNameResults
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