pub trait MulticastAddress {
// Required method
fn is_multicast(&self) -> bool;
// Provided method
fn is_non_multicast(&self) -> bool { ... }
}
Expand description
Addresses that can be multicast.
MulticastAddress
is implemented by address types for which some values are
considered multicast addresses. Multicast addresses are used to identify a
group of multiple network nodes, as opposed to unicast addresses, which
identify a single node, or broadcast addresses, which identify all the nodes
in some region of a network.
Required Methods§
Sourcefn is_multicast(&self) -> bool
fn is_multicast(&self) -> bool
Is this a multicast address?
is_multicast
must maintain the invariant that, if it is called twice
on the same object, and in between those two calls, no code has operated
on a mutable reference to that object, both calls will return the same
value. This property is required in order to implement
MulticastAddr
. Note that, since this is not an unsafe
trait,
unsafe
code may NOT rely on this property for its soundness. However,
code MAY rely on this property for its correctness.
If this type also implements SpecifiedAddress
, then
a.is_multicast()
implies a.is_specified()
.
Provided Methods§
Sourcefn is_non_multicast(&self) -> bool
fn is_non_multicast(&self) -> bool
Is this a non-multicast address? The inverse of is_multicast()
.