pub struct Hosts {
pub v4: HashMap<DomainName, Ipv4Addr>,
pub v6: HashMap<DomainName, Ipv6Addr>,
}
Expand description
A collection of A records.
Fields§
§v4: HashMap<DomainName, Ipv4Addr>
§v6: HashMap<DomainName, Ipv6Addr>
Implementations§
Source§impl Hosts
impl Hosts
pub fn new() -> Self
Sourcepub fn merge(&mut self, other: Hosts)
pub fn merge(&mut self, other: Hosts)
Merge another hosts file into this one. If the same name has records in both files, the new file will win.
Sourcepub fn from_zone_lossy(zone: &Zone) -> Self
pub fn from_zone_lossy(zone: &Zone) -> Self
Convert a zone into a hosts file, discarding any non-A and non-AAAA records.
Trait Implementations§
impl Eq for Hosts
impl StructuralPartialEq for Hosts
Auto Trait Implementations§
impl Freeze for Hosts
impl RefUnwindSafe for Hosts
impl Send for Hosts
impl Sync for Hosts
impl Unpin for Hosts
impl UnwindSafe for Hosts
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