Struct NdiscNeighborFlags
pub struct NdiscNeighborFlags(/* private fields */);Implementations§
§impl NeighborFlags
impl NeighborFlags
§impl NeighborFlags
impl NeighborFlags
pub const fn empty() -> NeighborFlags
pub const fn empty() -> NeighborFlags
Get a flags value with all bits unset.
pub const fn all() -> NeighborFlags
pub const fn all() -> NeighborFlags
Get a flags value with all known bits set.
pub const fn bits(&self) -> u8
pub const fn bits(&self) -> u8
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
pub const fn from_bits(bits: u8) -> Option<NeighborFlags>
pub const fn from_bits(bits: u8) -> Option<NeighborFlags>
Convert from a bits value.
This method will return None if any unknown bits are set.
pub const fn from_bits_truncate(bits: u8) -> NeighborFlags
pub const fn from_bits_truncate(bits: u8) -> NeighborFlags
Convert from a bits value, unsetting any unknown bits.
pub const fn from_bits_retain(bits: u8) -> NeighborFlags
pub const fn from_bits_retain(bits: u8) -> NeighborFlags
Convert from a bits value exactly.
pub fn from_name(name: &str) -> Option<NeighborFlags>
pub fn from_name(name: &str) -> Option<NeighborFlags>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
pub const fn intersects(&self, other: NeighborFlags) -> bool
pub const fn intersects(&self, other: NeighborFlags) -> bool
Whether any set bits in other are also set in self.
pub const fn contains(&self, other: NeighborFlags) -> bool
pub const fn contains(&self, other: NeighborFlags) -> bool
Whether all set bits in other are also set in self.
pub fn insert(&mut self, other: NeighborFlags)
pub fn insert(&mut self, other: NeighborFlags)
The bitwise or (|) of the bits in self and other.
pub fn remove(&mut self, other: NeighborFlags)
pub fn remove(&mut self, other: NeighborFlags)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
pub fn toggle(&mut self, other: NeighborFlags)
pub fn toggle(&mut self, other: NeighborFlags)
The bitwise exclusive-or (^) of the bits in self and other.
pub fn set(&mut self, other: NeighborFlags, value: bool)
pub fn set(&mut self, other: NeighborFlags, value: bool)
Call insert when value is true or remove when value is false.
pub const fn intersection(self, other: NeighborFlags) -> NeighborFlags
pub const fn intersection(self, other: NeighborFlags) -> NeighborFlags
The bitwise and (&) of the bits in self and other.
pub const fn union(self, other: NeighborFlags) -> NeighborFlags
pub const fn union(self, other: NeighborFlags) -> NeighborFlags
The bitwise or (|) of the bits in self and other.
pub const fn difference(self, other: NeighborFlags) -> NeighborFlags
pub const fn difference(self, other: NeighborFlags) -> NeighborFlags
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
pub const fn symmetric_difference(self, other: NeighborFlags) -> NeighborFlags
pub const fn symmetric_difference(self, other: NeighborFlags) -> NeighborFlags
The bitwise exclusive-or (^) of the bits in self and other.
pub const fn complement(self) -> NeighborFlags
pub const fn complement(self) -> NeighborFlags
The bitwise negation (!) of the bits in self, truncating the result.
§impl NeighborFlags
impl NeighborFlags
pub const fn iter(&self) -> Iter<NeighborFlags> ⓘ
pub const fn iter(&self) -> Iter<NeighborFlags> ⓘ
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
pub const fn iter_names(&self) -> IterNames<NeighborFlags> ⓘ
pub const fn iter_names(&self) -> IterNames<NeighborFlags> ⓘ
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
§impl Binary for NeighborFlags
impl Binary for NeighborFlags
§impl BitAnd for NeighborFlags
impl BitAnd for NeighborFlags
§fn bitand(self, other: NeighborFlags) -> NeighborFlags
fn bitand(self, other: NeighborFlags) -> NeighborFlags
The bitwise and (&) of the bits in self and other.
§type Output = NeighborFlags
type Output = NeighborFlags
& operator.§impl BitAndAssign for NeighborFlags
impl BitAndAssign for NeighborFlags
§fn bitand_assign(&mut self, other: NeighborFlags)
fn bitand_assign(&mut self, other: NeighborFlags)
The bitwise and (&) of the bits in self and other.
§impl BitOr for NeighborFlags
impl BitOr for NeighborFlags
§fn bitor(self, other: NeighborFlags) -> NeighborFlags
fn bitor(self, other: NeighborFlags) -> NeighborFlags
The bitwise or (|) of the bits in self and other.
§type Output = NeighborFlags
type Output = NeighborFlags
| operator.§impl BitOrAssign for NeighborFlags
impl BitOrAssign for NeighborFlags
§fn bitor_assign(&mut self, other: NeighborFlags)
fn bitor_assign(&mut self, other: NeighborFlags)
The bitwise or (|) of the bits in self and other.
§impl BitXor for NeighborFlags
impl BitXor for NeighborFlags
§fn bitxor(self, other: NeighborFlags) -> NeighborFlags
fn bitxor(self, other: NeighborFlags) -> NeighborFlags
The bitwise exclusive-or (^) of the bits in self and other.
§type Output = NeighborFlags
type Output = NeighborFlags
^ operator.§impl BitXorAssign for NeighborFlags
impl BitXorAssign for NeighborFlags
§fn bitxor_assign(&mut self, other: NeighborFlags)
fn bitxor_assign(&mut self, other: NeighborFlags)
The bitwise exclusive-or (^) of the bits in self and other.
§impl Clone for NeighborFlags
impl Clone for NeighborFlags
§fn clone(&self) -> NeighborFlags
fn clone(&self) -> NeighborFlags
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for NeighborFlags
§impl Debug for NeighborFlags
impl Debug for NeighborFlags
impl Eq for NeighborFlags
§impl Extend<NeighborFlags> for NeighborFlags
impl Extend<NeighborFlags> for NeighborFlags
§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = NeighborFlags>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = NeighborFlags>,
The bitwise or (|) of the bits in each flags value.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)§impl Flags for NeighborFlags
impl Flags for NeighborFlags
§const FLAGS: &'static [Flag<NeighborFlags>]
const FLAGS: &'static [Flag<NeighborFlags>]
§fn from_bits_retain(bits: u8) -> NeighborFlags
fn from_bits_retain(bits: u8) -> NeighborFlags
§fn all_named() -> NeighborFlags
fn all_named() -> NeighborFlags
Source§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
Source§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self> ⓘ
fn iter_names(&self) -> IterNames<Self> ⓘ
Source§fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
Self::FLAGS.Source§fn iter_equal_names(&self) -> IterEqualNames<Self> ⓘ
fn iter_equal_names(&self) -> IterEqualNames<Self> ⓘ
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in self and other.Source§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in self and other.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in self and other.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
Source§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in self and other.Source§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in self, truncating the result.§impl Format for NeighborFlags
Available on crate feature defmt only.
impl Format for NeighborFlags
defmt only.§impl FromIterator<NeighborFlags> for NeighborFlags
impl FromIterator<NeighborFlags> for NeighborFlags
§fn from_iter<T>(iterator: T) -> NeighborFlagswhere
T: IntoIterator<Item = NeighborFlags>,
fn from_iter<T>(iterator: T) -> NeighborFlagswhere
T: IntoIterator<Item = NeighborFlags>,
The bitwise or (|) of the bits in each flags value.
§impl Hash for NeighborFlags
impl Hash for NeighborFlags
§impl IntoIterator for NeighborFlags
impl IntoIterator for NeighborFlags
§type Item = NeighborFlags
type Item = NeighborFlags
§type IntoIter = Iter<NeighborFlags>
type IntoIter = Iter<NeighborFlags>
§fn into_iter(self) -> <NeighborFlags as IntoIterator>::IntoIter
fn into_iter(self) -> <NeighborFlags as IntoIterator>::IntoIter
§impl LowerHex for NeighborFlags
impl LowerHex for NeighborFlags
§impl Not for NeighborFlags
impl Not for NeighborFlags
§fn not(self) -> NeighborFlags
fn not(self) -> NeighborFlags
The bitwise negation (!) of the bits in self, truncating the result.
§type Output = NeighborFlags
type Output = NeighborFlags
! operator.§impl Octal for NeighborFlags
impl Octal for NeighborFlags
§impl Ord for NeighborFlags
impl Ord for NeighborFlags
§fn cmp(&self, other: &NeighborFlags) -> Ordering
fn cmp(&self, other: &NeighborFlags) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialEq for NeighborFlags
impl PartialEq for NeighborFlags
§impl PartialOrd for NeighborFlags
impl PartialOrd for NeighborFlags
impl StructuralPartialEq for NeighborFlags
§impl Sub for NeighborFlags
impl Sub for NeighborFlags
§fn sub(self, other: NeighborFlags) -> NeighborFlags
fn sub(self, other: NeighborFlags) -> NeighborFlags
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
§type Output = NeighborFlags
type Output = NeighborFlags
- operator.§impl SubAssign for NeighborFlags
impl SubAssign for NeighborFlags
§fn sub_assign(&mut self, other: NeighborFlags)
fn sub_assign(&mut self, other: NeighborFlags)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.