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