Enum cdns_rs::query::QDnsQueriesRes
source · pub enum QDnsQueriesRes {
DnsOk {
res: Vec<QDnsQuery>,
},
DnsNotAvailable,
}
Expand description
The result enum.
Variants§
Implementations§
source§impl QDnsQueriesRes
impl QDnsQueriesRes
sourcepub fn into_inner(self) -> Option<Vec<QDnsQuery>>
pub fn into_inner(self) -> Option<Vec<QDnsQuery>>
Unwraps the results without panics.
sourcepub fn is_results(&self) -> bool
pub fn is_results(&self) -> bool
Checks if the received result contains any results. It does not check if results were successfull. It just answers on question if any DNS server responded or record in local databases was found.
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
This function tells how many responses it contains. If Self is QDnsQueriesRes::DnsNotAvailable then 0 will be returned.
sourcepub fn list_results(&self) -> Option<Iter<'_, QDnsQuery>>
pub fn list_results(&self) -> Option<Iter<'_, QDnsQuery>>
This function returns the results if any.
Trait Implementations§
source§impl Debug for QDnsQueriesRes
impl Debug for QDnsQueriesRes
source§impl Display for QDnsQueriesRes
impl Display for QDnsQueriesRes
source§impl From<LinkedList<QDnsQuery>> for QDnsQueriesRes
impl From<LinkedList<QDnsQuery>> for QDnsQueriesRes
source§fn from(responses: LinkedList<QDnsQuery>) -> Self
fn from(responses: LinkedList<QDnsQuery>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for QDnsQueriesRes
impl RefUnwindSafe for QDnsQueriesRes
impl Send for QDnsQueriesRes
impl Sync for QDnsQueriesRes
impl Unpin for QDnsQueriesRes
impl UnwindSafe for QDnsQueriesRes
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