pub struct Zones {
zones: HashMap<DomainName, Zone>,
}
Expand description
A collection of zones.
Fields§
§zones: HashMap<DomainName, Zone>
Implementations§
Source§impl Zones
impl Zones
pub fn new() -> Self
Sourcepub fn get(&self, name: &DomainName) -> Option<&Zone>
pub fn get(&self, name: &DomainName) -> Option<&Zone>
Find the zone for a domain, if there is one.
Sourcepub fn resolve(
&self,
name: &DomainName,
qtype: QueryType,
) -> Option<(&Zone, ZoneResult)>
pub fn resolve( &self, name: &DomainName, qtype: QueryType, ) -> Option<(&Zone, ZoneResult)>
Resolve a query aginst the appropriate zone. Returns None
if there is
no zone.
This corresponds to step 3 of the standard nameserver algorithm (see section 4.3.2 of RFC 1034).
Sourcepub fn insert_merge(&mut self, other_zone: Zone)
pub fn insert_merge(&mut self, other_zone: Zone)
Create a new zone or merge with an existing one. See
Zone.merge
for details.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Zones
impl RefUnwindSafe for Zones
impl Send for Zones
impl Sync for Zones
impl Unpin for Zones
impl UnwindSafe for Zones
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