pub struct RecursiveDnsServer<'a> { /* private fields */ }
Expand description
Recursive DNS Server that is advertised by a router in Router Advertisements.
See RFC 8106 section 5.1.
Implementations§
Source§impl<'a> RecursiveDnsServer<'a>
impl<'a> RecursiveDnsServer<'a>
Sourcepub const INFINITE_LIFETIME: u32 = 4_294_967_295u32
pub const INFINITE_LIFETIME: u32 = 4_294_967_295u32
The u32
value representing an infinite lifetime for a RecursiveDnsServer option.
Sourcepub fn new(lifetime: u32, addresses: &'a [Ipv6Addr]) -> RecursiveDnsServer<'a>
pub fn new(lifetime: u32, addresses: &'a [Ipv6Addr]) -> RecursiveDnsServer<'a>
Returns a new RecursiveDnsServer
.
Sourcepub fn lifetime(&self) -> Option<NonZeroDuration>
pub fn lifetime(&self) -> Option<NonZeroDuration>
Returns the length of time (relative to the time the packet is sent) that the DNS servers are valid for name resolution.
A value of INFINITE_LIFETIME
represents infinity; a value of None
means that the servers MUST no longer be used.
Sourcepub fn iter_addresses(&self) -> &'a [Ipv6Addr]
pub fn iter_addresses(&self) -> &'a [Ipv6Addr]
Returns the recursive DNS server addresses.
Trait Implementations§
Source§impl<'a> Clone for RecursiveDnsServer<'a>
impl<'a> Clone for RecursiveDnsServer<'a>
Source§fn clone(&self) -> RecursiveDnsServer<'a>
fn clone(&self) -> RecursiveDnsServer<'a>
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<'a> Debug for RecursiveDnsServer<'a>
impl<'a> Debug for RecursiveDnsServer<'a>
Source§impl<'a> PartialEq for RecursiveDnsServer<'a>
impl<'a> PartialEq for RecursiveDnsServer<'a>
impl<'a> Eq for RecursiveDnsServer<'a>
impl<'a> StructuralPartialEq for RecursiveDnsServer<'a>
Auto Trait Implementations§
impl<'a> Freeze for RecursiveDnsServer<'a>
impl<'a> RefUnwindSafe for RecursiveDnsServer<'a>
impl<'a> Send for RecursiveDnsServer<'a>
impl<'a> Sync for RecursiveDnsServer<'a>
impl<'a> Unpin for RecursiveDnsServer<'a>
impl<'a> UnwindSafe for RecursiveDnsServer<'a>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)