pub struct Bootstrap {
pub ipv4: Registry,
pub ipv6: Registry,
pub dns: Registry,
}Expand description
The three registries together.
Hold one of these for as long as the process runs. IANA changes the files rarely, and the answer for an address does not move between them.
Fields§
§ipv4: RegistryThe registry for IPv4 addresses.
ipv6: RegistryThe registry for IPv6 addresses.
dns: RegistryThe registry for domain names.
Implementations§
Source§impl Bootstrap
impl Bootstrap
Sourcepub fn server_for_ip(&self, ip: IpAddr) -> Option<&str>
pub fn server_for_ip(&self, ip: IpAddr) -> Option<&str>
Returns the base URL of the server that answers for this address.
Sourcepub fn server_for_domain(&self, domain: &DomainName) -> Option<&str>
pub fn server_for_domain(&self, domain: &DomainName) -> Option<&str>
Returns the base URL of the server that answers for this name.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Bootstrap
impl RefUnwindSafe for Bootstrap
impl Send for Bootstrap
impl Sync for Bootstrap
impl Unpin for Bootstrap
impl UnsafeUnpin for Bootstrap
impl UnwindSafe for Bootstrap
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more