Struct packet_formats::icmp::ndp::options::RecursiveDnsServer
source · 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>
source§fn eq(&self, other: &RecursiveDnsServer<'a>) -> bool
fn eq(&self, other: &RecursiveDnsServer<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)