Struct mhost::resolver::query::MultiQuery
source · pub struct MultiQuery { /* private fields */ }
Expand description
MultiQuery allows to lookup multiple names for multiple record types
It can be easily constructed from a simple UniQuery
§Example
let query = UniQuery::new("www.example.com", RecordType::A).unwrap();
let multi_query: MultiQuery = query.into();
Implementations§
source§impl MultiQuery
impl MultiQuery
pub fn new<N: IntoName, S: IntoIterator<Item = N>, T: IntoIterator<Item = RecordType>>( names: S, record_types: T ) -> ResolverResult<MultiQuery>
sourcepub fn single<N: IntoName>(
name: N,
record_type: RecordType
) -> ResolverResult<MultiQuery>
pub fn single<N: IntoName>( name: N, record_type: RecordType ) -> ResolverResult<MultiQuery>
Lookup a single name for a single records type
sourcepub fn multi_name<N: IntoName, S: IntoIterator<Item = N>>(
names: S,
record_type: RecordType
) -> ResolverResult<MultiQuery>
pub fn multi_name<N: IntoName, S: IntoIterator<Item = N>>( names: S, record_type: RecordType ) -> ResolverResult<MultiQuery>
Lookup a multiple names for a single records type
sourcepub fn multi_record<N: IntoName, T: IntoIterator<Item = RecordType>>(
name: N,
record_types: T
) -> ResolverResult<MultiQuery>
pub fn multi_record<N: IntoName, T: IntoIterator<Item = RecordType>>( name: N, record_types: T ) -> ResolverResult<MultiQuery>
Lookup a single name for a multiple records types
sourcepub fn into_uni_queries(self) -> Vec<UniQuery>
pub fn into_uni_queries(self) -> Vec<UniQuery>
Converts this MultiQuery
into individual UniQuery
s
sourcepub fn num_record_types(&self) -> usize
pub fn num_record_types(&self) -> usize
Returns number of record types of this MultiQuery
Trait Implementations§
source§impl Clone for MultiQuery
impl Clone for MultiQuery
source§fn clone(&self) -> MultiQuery
fn clone(&self) -> MultiQuery
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 Debug for MultiQuery
impl Debug for MultiQuery
source§impl From<UniQuery> for MultiQuery
impl From<UniQuery> for MultiQuery
source§fn from(query: UniQuery) -> MultiQuery
fn from(query: UniQuery) -> MultiQuery
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for MultiQuery
impl Send for MultiQuery
impl Sync for MultiQuery
impl Unpin for MultiQuery
impl UnwindSafe for MultiQuery
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