pub type Ipv4DeviceAddr = NonMulticastAddr<NonMappedAddr<SpecifiedAddr<Ipv4Addr>>>;
Expand description
An Ipv4 address that witnesses properties needed to be assigned to a device.
These witnesses are the same that are held by IpDeviceAddr
, however that
type cannot be used here directly because we need Ipv4DeviceAddr
to
implement Witness<Ipv4Addr>
. That implementation is not present for our
new type IpDeviceAddr
which wraps the true witnesses from the net-types
crate.
Aliased Type§
struct Ipv4DeviceAddr(/* private fields */);
Implementations
Source§impl<A> NonMulticastAddr<A>
impl<A> NonMulticastAddr<A>
Sourcepub const unsafe fn new_unchecked(addr: A) -> NonMulticastAddr<A>
pub const unsafe fn new_unchecked(addr: A) -> NonMulticastAddr<A>
Constructs a new NonMulticastAddr
without
checking to see if addr
is actually non-multicast.
§Safety
It is up to the caller to make sure that addr
is non-multicast to avoid breaking
the guarantees of NonMulticastAddr
. See NonMulticastAddr
for
more details.
Source§impl<A> NonMulticastAddr<A>where
A: MulticastAddress,
impl<A> NonMulticastAddr<A>where
A: MulticastAddress,
Sourcepub fn new(addr: A) -> Option<NonMulticastAddr<A>>
pub fn new(addr: A) -> Option<NonMulticastAddr<A>>
Constructs a new NonMulticastAddr
.
new
returns None
if !addr.is_non_multicast()
.
Sourcepub fn from_witness<W>(addr: W) -> Option<NonMulticastAddr<A>>where
W: Witness<A>,
pub fn from_witness<W>(addr: W) -> Option<NonMulticastAddr<A>>where
W: Witness<A>,
Constructs a new NonMulticastAddr
from a
witness type.
from_witness(witness)
is equivalent to new(witness.into_addr())
.
Trait Implementations
Source§impl<A> AsRef<A> for NonMulticastAddr<A>where
A: MulticastAddress,
impl<A> AsRef<A> for NonMulticastAddr<A>where
A: MulticastAddress,
Source§impl<A> AsRef<A> for NonMulticastAddr<NonMappedAddr<A>>where
A: MulticastAddress + MappedAddress,
impl<A> AsRef<A> for NonMulticastAddr<NonMappedAddr<A>>where
A: MulticastAddress + MappedAddress,
Source§impl<A> AsRef<A> for NonMulticastAddr<NonMappedAddr<SpecifiedAddr<A>>>
impl<A> AsRef<A> for NonMulticastAddr<NonMappedAddr<SpecifiedAddr<A>>>
Source§impl<A> AsRef<NonMulticastAddr<A>> for NonMulticastAddr<A>where
A: MulticastAddress,
impl<A> AsRef<NonMulticastAddr<A>> for NonMulticastAddr<A>where
A: MulticastAddress,
Source§fn as_ref(&self) -> &NonMulticastAddr<A>
fn as_ref(&self) -> &NonMulticastAddr<A>
Source§impl<A> Clone for NonMulticastAddr<A>where
A: Clone,
impl<A> Clone for NonMulticastAddr<A>where
A: Clone,
Source§fn clone(&self) -> NonMulticastAddr<A>
fn clone(&self) -> NonMulticastAddr<A>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<A> Debug for NonMulticastAddr<A>where
A: Debug,
impl<A> Debug for NonMulticastAddr<A>where
A: Debug,
Source§impl<A> Deref for NonMulticastAddr<A>where
A: MulticastAddress,
impl<A> Deref for NonMulticastAddr<A>where
A: MulticastAddress,
Source§impl<A> Display for NonMulticastAddr<A>where
A: Display,
impl<A> Display for NonMulticastAddr<A>where
A: Display,
Source§impl<A> Hash for NonMulticastAddr<A>where
A: Hash,
impl<A> Hash for NonMulticastAddr<A>where
A: Hash,
Source§impl<A> Ord for NonMulticastAddr<A>where
A: Ord,
impl<A> Ord for NonMulticastAddr<A>where
A: Ord,
Source§fn cmp(&self, other: &NonMulticastAddr<A>) -> Ordering
fn cmp(&self, other: &NonMulticastAddr<A>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<A> PartialEq for NonMulticastAddr<A>where
A: PartialEq,
impl<A> PartialEq for NonMulticastAddr<A>where
A: PartialEq,
Source§impl<A> PartialOrd for NonMulticastAddr<A>where
A: PartialOrd,
impl<A> PartialOrd for NonMulticastAddr<A>where
A: PartialOrd,
Source§impl<A> TransposableWitness<A> for NonMulticastAddr<A>where
A: MulticastAddress,
impl<A> TransposableWitness<A> for NonMulticastAddr<A>where
A: MulticastAddress,
Source§type Map<T> = NonMulticastAddr<T>
type Map<T> = NonMulticastAddr<T>
Source§impl<A> Witness<A> for NonMulticastAddr<A>where
A: MulticastAddress,
impl<A> Witness<A> for NonMulticastAddr<A>where
A: MulticastAddress,
Source§unsafe fn new_unchecked(addr: A) -> NonMulticastAddr<A>
unsafe fn new_unchecked(addr: A) -> NonMulticastAddr<A>
addr
actually
satisfies the required property. Read moreSource§fn from_witness<W>(addr: W) -> Option<Self>where
W: Witness<A>,
fn from_witness<W>(addr: W) -> Option<Self>where
W: Witness<A>,
Source§fn transpose<T>(self) -> <A as TransposableWitness<T>>::Map<Self::Map<T>>where
Self: TransposableWitness<A>,
A: TransposableWitness<T>,
Self::Map<T>: Witness<T>,
<A as TransposableWitness<T>>::Map<Self::Map<T>>: Witness<Self::Map<T>>,
fn transpose<T>(self) -> <A as TransposableWitness<T>>::Map<Self::Map<T>>where
Self: TransposableWitness<A>,
A: TransposableWitness<T>,
Self::Map<T>: Witness<T>,
<A as TransposableWitness<T>>::Map<Self::Map<T>>: Witness<Self::Map<T>>,
Source§impl<A> Witness<A> for NonMulticastAddr<NonMappedAddr<A>>where
A: MulticastAddress + MappedAddress,
impl<A> Witness<A> for NonMulticastAddr<NonMappedAddr<A>>where
A: MulticastAddress + MappedAddress,
Source§fn new(addr: A) -> Option<NonMulticastAddr<NonMappedAddr<A>>>
fn new(addr: A) -> Option<NonMulticastAddr<NonMappedAddr<A>>>
Source§unsafe fn new_unchecked(addr: A) -> NonMulticastAddr<NonMappedAddr<A>>
unsafe fn new_unchecked(addr: A) -> NonMulticastAddr<NonMappedAddr<A>>
addr
actually
satisfies the required property. Read moreSource§fn from_witness<W>(addr: W) -> Option<Self>where
W: Witness<A>,
fn from_witness<W>(addr: W) -> Option<Self>where
W: Witness<A>,
Source§fn transpose<T>(self) -> <A as TransposableWitness<T>>::Map<Self::Map<T>>where
Self: TransposableWitness<A>,
A: TransposableWitness<T>,
Self::Map<T>: Witness<T>,
<A as TransposableWitness<T>>::Map<Self::Map<T>>: Witness<Self::Map<T>>,
fn transpose<T>(self) -> <A as TransposableWitness<T>>::Map<Self::Map<T>>where
Self: TransposableWitness<A>,
A: TransposableWitness<T>,
Self::Map<T>: Witness<T>,
<A as TransposableWitness<T>>::Map<Self::Map<T>>: Witness<Self::Map<T>>,
Source§impl<A> Witness<A> for NonMulticastAddr<NonMappedAddr<SpecifiedAddr<A>>>
impl<A> Witness<A> for NonMulticastAddr<NonMappedAddr<SpecifiedAddr<A>>>
Source§fn new(addr: A) -> Option<NonMulticastAddr<NonMappedAddr<SpecifiedAddr<A>>>>
fn new(addr: A) -> Option<NonMulticastAddr<NonMappedAddr<SpecifiedAddr<A>>>>
Source§unsafe fn new_unchecked(
addr: A,
) -> NonMulticastAddr<NonMappedAddr<SpecifiedAddr<A>>>
unsafe fn new_unchecked( addr: A, ) -> NonMulticastAddr<NonMappedAddr<SpecifiedAddr<A>>>
addr
actually
satisfies the required property. Read more