pub type LinkLocalMulticastAddr<A> = LinkLocalAddr<MulticastAddr<A>>;
Expand description

A link-local multicast address.

Aliased Type§

struct LinkLocalMulticastAddr<A>(/* private fields */);

Implementations§

source§

impl<A: LinkLocalAddress> LinkLocalAddr<A>

source

pub fn new(addr: A) -> Option<LinkLocalAddr<A>>

Constructs a new LinkLocalAddr.

new returns None if !addr.is_link_local().

source

pub fn from_witness<W: Witness<A>>(addr: W) -> Option<LinkLocalAddr<A>>

Constructs a new LinkLocalAddr from a witness type.

from_witness(witness) is equivalent to new(witness.into_addr()).

source§

impl<A> LinkLocalAddr<A>

source

pub const unsafe fn new_unchecked(addr: A) -> LinkLocalAddr<A>

Constructs a new LinkLocalAddr without checking to see if addr is actually link-local.

Safety

It is up to the caller to make sure that addr is link-local to avoid breaking the guarantees of LinkLocalAddr. See LinkLocalAddr for more details.

source§

impl<A: LinkLocalAddress + SpecifiedAddress> LinkLocalAddr<A>

source

pub fn into_specified(self) -> SpecifiedAddr<A>

Converts this LinkLocalAddr into a SpecifiedAddr.

LinkLocalAddress::is_link_local implies SpecifiedAddress::is_specified, so all LinkLocalAddrs are guaranteed to be specified, so this conversion is infallible.

source§

impl<A: LinkLocalAddress + MulticastAddress> LinkLocalAddr<MulticastAddr<A>>

source

pub fn new_multicast(addr: A) -> Option<LinkLocalAddr<MulticastAddr<A>>>

Constructs a new LinkLocalAddr<MulticastAddr<A>>.

new_multicast(addr) is equivalent to MulticastAddr::new(addr).and_then(LinkLocalAddr::new)).

Trait Implementations§

source§

impl<A: LinkLocalAddress> AsRef<A> for LinkLocalAddr<A>

source§

fn as_ref(&self) -> &A

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<A: LinkLocalAddress + MulticastAddress> AsRef<A> for LinkLocalAddr<MulticastAddr<A>>

source§

fn as_ref(&self) -> &A

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<A: LinkLocalAddress> AsRef<LinkLocalAddr<A>> for LinkLocalAddr<A>

source§

fn as_ref(&self) -> &LinkLocalAddr<A>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<A: BroadcastAddress> BroadcastAddress for LinkLocalAddr<A>

source§

fn is_broadcast(&self) -> bool

Is this a broadcast address? Read more
source§

impl<A: Clone> Clone for LinkLocalAddr<A>

source§

fn clone(&self) -> LinkLocalAddr<A>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<A: Debug> Debug for LinkLocalAddr<A>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<A: LinkLocalAddress> Deref for LinkLocalAddr<A>

§

type Target = A

The resulting type after dereferencing.
source§

fn deref(&self) -> &A

Dereferences the value.
source§

impl<A: Display> Display for LinkLocalAddr<A>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<IpAddr<LinkLocalAddr<MulticastAddr<Ipv4Addr>>, LinkLocalAddr<MulticastAddr<Ipv6Addr>>>> for LinkLocalMulticastAddr<IpAddr>

source§

impl<A: IpAddress> From<LinkLocalAddr<MulticastAddr<A>>> for LinkLocalMulticastAddr<IpAddr>

source§

fn from(addr: LinkLocalMulticastAddr<A>) -> LinkLocalMulticastAddr<IpAddr>

Converts to this type from the input type.
source§

impl<A: Hash> Hash for LinkLocalAddr<A>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<A: IpAddress> IpAddressWitness<A> for LinkLocalAddr<A>

§

type IpAddrWitness = LinkLocalAddr<IpAddr<Ipv4Addr, Ipv6Addr>>

The type-erased version of Self. Read more
source§

impl<A: MappedAddress> MappedAddress for LinkLocalAddr<A>

source§

fn is_non_mapped(&self) -> bool

Is this a non-mapped address?
source§

impl<A: MulticastAddress> MulticastAddress for LinkLocalAddr<A>

source§

fn is_multicast(&self) -> bool

Is this a unicast address? Read more
source§

impl<A: Ord> Ord for LinkLocalAddr<A>

source§

fn cmp(&self, other: &LinkLocalAddr<A>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl<A: PartialEq> PartialEq<LinkLocalAddr<A>> for LinkLocalAddr<A>

source§

fn eq(&self, other: &LinkLocalAddr<A>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<A: PartialOrd> PartialOrd<LinkLocalAddr<A>> for LinkLocalAddr<A>

source§

fn partial_cmp(&self, other: &LinkLocalAddr<A>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<A: ScopeableAddress> ScopeableAddress for LinkLocalAddr<A>

§

type Scope = <A as ScopeableAddress>::Scope

The type of all non-global scopes.
source§

fn scope(&self) -> Self::Scope

The scope of this address. Read more
source§

impl<A: SpecifiedAddress> SpecifiedAddress for LinkLocalAddr<A>

source§

fn is_specified(&self) -> bool

Is this a specified address? Read more
source§

impl<A: LinkLocalAddress> TransposableWitness<A> for LinkLocalAddr<A>

§

type Map<T> = LinkLocalAddr<T>

Maps the type wrapped by this witness.
source§

impl<A: BroadcastAddress + LinkLocalAddress> TryFrom<BroadcastAddr<A>> for LinkLocalAddr<A>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(addr: BroadcastAddr<A>) -> Result<LinkLocalAddr<A>, ()>

Performs the conversion.
source§

impl<A: BroadcastAddress + LinkLocalMulticastAddress> TryFrom<BroadcastAddr<A>> for LinkLocalMulticastAddr<A>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(addr: BroadcastAddr<A>) -> Result<LinkLocalMulticastAddr<A>, ()>

Performs the conversion.
source§

impl TryFrom<Ipv4Addr> for LinkLocalMulticastAddr<Ipv4Addr>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(addr: Ipv4Addr) -> Result<LinkLocalMulticastAddr<Ipv4Addr>, ()>

Performs the conversion.
source§

impl TryFrom<Ipv6Addr> for LinkLocalMulticastAddr<Ipv6Addr>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(addr: Ipv6Addr) -> Result<LinkLocalMulticastAddr<Ipv6Addr>, ()>

Performs the conversion.
source§

impl<A: LinkLocalAddress + MulticastAddress> TryFrom<LinkLocalAddr<A>> for LinkLocalAddr<MulticastAddr<A>>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from( addr: LinkLocalAddr<A> ) -> Result<LinkLocalAddr<MulticastAddr<A>>, ()>

Performs the conversion.
source§

impl<A: LinkLocalBroadcastAddress + LinkLocalAddress> TryFrom<LinkLocalAddr<BroadcastAddr<A>>> for LinkLocalAddr<A>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(addr: LinkLocalBroadcastAddr<A>) -> Result<LinkLocalAddr<A>, ()>

Performs the conversion.
source§

impl<A: LinkLocalBroadcastAddress + LinkLocalMulticastAddress> TryFrom<LinkLocalAddr<BroadcastAddr<A>>> for LinkLocalMulticastAddr<A>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from( addr: LinkLocalBroadcastAddr<A> ) -> Result<LinkLocalMulticastAddr<A>, ()>

Performs the conversion.
source§

impl<A: LinkLocalMulticastAddress + LinkLocalAddress> TryFrom<LinkLocalAddr<MulticastAddr<A>>> for LinkLocalAddr<A>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(addr: LinkLocalMulticastAddr<A>) -> Result<LinkLocalAddr<A>, ()>

Performs the conversion.
source§

impl<A: LinkLocalUnicastAddress + LinkLocalAddress> TryFrom<LinkLocalAddr<UnicastAddr<A>>> for LinkLocalAddr<A>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(addr: LinkLocalUnicastAddr<A>) -> Result<LinkLocalAddr<A>, ()>

Performs the conversion.
source§

impl<A: LinkLocalUnicastAddress + LinkLocalMulticastAddress> TryFrom<LinkLocalAddr<UnicastAddr<A>>> for LinkLocalMulticastAddr<A>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from( addr: LinkLocalUnicastAddr<A> ) -> Result<LinkLocalMulticastAddr<A>, ()>

Performs the conversion.
source§

impl<A: MulticastAddress + LinkLocalAddress> TryFrom<MulticastAddr<A>> for LinkLocalAddr<A>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(addr: MulticastAddr<A>) -> Result<LinkLocalAddr<A>, ()>

Performs the conversion.
source§

impl<A: LinkLocalAddress + MulticastAddress> TryFrom<MulticastAddr<A>> for LinkLocalAddr<MulticastAddr<A>>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from( addr: MulticastAddr<A> ) -> Result<LinkLocalAddr<MulticastAddr<A>>, ()>

Performs the conversion.
source§

impl<A: MappedAddress + LinkLocalAddress> TryFrom<NonMappedAddr<A>> for LinkLocalAddr<A>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(addr: NonMappedAddr<A>) -> Result<LinkLocalAddr<A>, ()>

Performs the conversion.
source§

impl<A: MappedAddress + LinkLocalMulticastAddress> TryFrom<NonMappedAddr<A>> for LinkLocalMulticastAddr<A>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(addr: NonMappedAddr<A>) -> Result<LinkLocalMulticastAddr<A>, ()>

Performs the conversion.
source§

impl<A: SpecifiedAddress + LinkLocalAddress> TryFrom<SpecifiedAddr<A>> for LinkLocalAddr<A>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(addr: SpecifiedAddr<A>) -> Result<LinkLocalAddr<A>, ()>

Performs the conversion.
source§

impl<A: SpecifiedAddress + LinkLocalMulticastAddress> TryFrom<SpecifiedAddr<A>> for LinkLocalMulticastAddr<A>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(addr: SpecifiedAddr<A>) -> Result<LinkLocalMulticastAddr<A>, ()>

Performs the conversion.
source§

impl<A: UnicastAddress + LinkLocalAddress> TryFrom<UnicastAddr<A>> for LinkLocalAddr<A>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(addr: UnicastAddr<A>) -> Result<LinkLocalAddr<A>, ()>

Performs the conversion.
source§

impl<A: UnicastAddress + LinkLocalMulticastAddress> TryFrom<UnicastAddr<A>> for LinkLocalMulticastAddr<A>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(addr: UnicastAddr<A>) -> Result<LinkLocalMulticastAddr<A>, ()>

Performs the conversion.
source§

impl<A: UnicastAddress> UnicastAddress for LinkLocalAddr<A>

source§

fn is_unicast(&self) -> bool

Is this a unicast address? Read more
source§

impl<A: LinkLocalAddress> Witness<A> for LinkLocalAddr<A>

source§

fn new(addr: A) -> Option<LinkLocalAddr<A>>

Constructs a new witness type. Read more
source§

unsafe fn new_unchecked(addr: A) -> LinkLocalAddr<A>

Constructs a new witness type without checking to see if addr actually satisfies the required property. Read more
source§

fn into_addr(self) -> A

Consumes this witness and returns the contained A. Read more
source§

fn from_witness<W: Witness<A>>(addr: W) -> Option<Self>

Constructs a new witness type from an existing witness type. Read more
source§

fn transpose<T>(self) -> A::Map<Self::Map<T>>where Self: TransposableWitness<A>, A: TransposableWitness<T>, Self::Map<T>: Witness<T>, A::Map<Self::Map<T>>: Witness<Self::Map<T>>,

Transposes this witness type with another witness type layered inside of it. (e.g. UnicastAddr<SpecifiedAddr> -> SpecifiedAddr<UnicastAddr>)
source§

impl<A: LinkLocalAddress + MulticastAddress> Witness<A> for LinkLocalAddr<MulticastAddr<A>>

source§

fn new(addr: A) -> Option<LinkLocalAddr<MulticastAddr<A>>>

Constructs a new witness type. Read more
source§

unsafe fn new_unchecked(addr: A) -> LinkLocalAddr<MulticastAddr<A>>

Constructs a new witness type without checking to see if addr actually satisfies the required property. Read more
source§

fn into_addr(self) -> A

Consumes this witness and returns the contained A. Read more
source§

fn from_witness<W: Witness<A>>(addr: W) -> Option<Self>

Constructs a new witness type from an existing witness type. Read more
source§

impl<A: Copy> Copy for LinkLocalAddr<A>

source§

impl<A: Eq> Eq for LinkLocalAddr<A>

source§

impl<A> StructuralEq for LinkLocalAddr<A>

source§

impl<A> StructuralPartialEq for LinkLocalAddr<A>