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