pub enum FrameDestination<L = bool> {
Individual {
local: L,
},
Multicast,
Broadcast,
}Expand description
The type of address used as the destination address in a device-layer frame.
FrameDestination is used to implement RFC 1122 section 3.2.2 and RFC 4443
section 2.4.e, which govern when to avoid sending an ICMP error message for
ICMP and ICMPv6 respectively.
Variants§
Individual
A unicast address - one which is neither multicast nor broadcast.
Fields
local: LWhether the frame’s destination address belongs to the receiver.
Multicast
A multicast address; if the addressing scheme supports overlap between
multicast and broadcast, then broadcast addresses should use the
Broadcast variant.
Broadcast
A broadcast address; if the addressing scheme supports overlap between
multicast and broadcast, then broadcast addresses should use the
Broadcast variant.
Implementations§
Source§impl<L> FrameDestination<L>
impl<L> FrameDestination<L>
Sourcepub fn is_broadcast(self) -> bool
pub fn is_broadcast(self) -> bool
Is this FrameDestination::Broadcast?
Source§impl FrameDestination
impl FrameDestination
Sourcepub fn from_dest(destination: Mac, local_mac: Mac) -> FrameDestination
pub fn from_dest(destination: Mac, local_mac: Mac) -> FrameDestination
Creates a FrameDestination from a mac and local_mac destination.
Sourcepub fn check_local(self) -> Option<FrameDestination<()>>
pub fn check_local(self) -> Option<FrameDestination<()>>
Converts this FrameDestination to a LocalFrameDestination.
Returns None if the destination is Individual { local: false },
indicating the packet is not for this host and should be dropped.
Trait Implementations§
Source§impl<L> Clone for FrameDestination<L>where
L: Clone,
impl<L> Clone for FrameDestination<L>where
L: Clone,
Source§fn clone(&self) -> FrameDestination<L>
fn clone(&self) -> FrameDestination<L>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<L> Debug for FrameDestination<L>where
L: Debug,
impl<L> Debug for FrameDestination<L>where
L: Debug,
Source§impl<L> From<BroadcastAddr<Mac>> for FrameDestination<L>
impl<L> From<BroadcastAddr<Mac>> for FrameDestination<L>
Source§fn from(_value: BroadcastAddr<Mac>) -> FrameDestination<L>
fn from(_value: BroadcastAddr<Mac>) -> FrameDestination<L>
Source§impl<L> From<MulticastAddr<Mac>> for FrameDestination<L>
impl<L> From<MulticastAddr<Mac>> for FrameDestination<L>
Source§fn from(_value: MulticastAddr<Mac>) -> FrameDestination<L>
fn from(_value: MulticastAddr<Mac>) -> FrameDestination<L>
Source§impl<L> PartialEq for FrameDestination<L>where
L: PartialEq,
impl<L> PartialEq for FrameDestination<L>where
L: PartialEq,
Source§fn eq(&self, other: &FrameDestination<L>) -> bool
fn eq(&self, other: &FrameDestination<L>) -> bool
self and other values to be equal, and is used by ==.impl<L> Copy for FrameDestination<L>where
L: Copy,
impl<L> Eq for FrameDestination<L>where
L: Eq,
impl<L> StructuralPartialEq for FrameDestination<L>
Auto Trait Implementations§
impl<L> Freeze for FrameDestination<L>where
L: Freeze,
impl<L> RefUnwindSafe for FrameDestination<L>where
L: RefUnwindSafe,
impl<L> Send for FrameDestination<L>where
L: Send,
impl<L> Sync for FrameDestination<L>where
L: Sync,
impl<L> Unpin for FrameDestination<L>where
L: Unpin,
impl<L> UnsafeUnpin for FrameDestination<L>where
L: UnsafeUnpin,
impl<L> UnwindSafe for FrameDestination<L>where
L: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more