Struct NdiscPrefixInfoFlags
pub struct NdiscPrefixInfoFlags(/* private fields */);Implementations§
§impl PrefixInfoFlags
impl PrefixInfoFlags
pub const ON_LINK: PrefixInfoFlags
pub const ADDRCONF: PrefixInfoFlags
§impl PrefixInfoFlags
impl PrefixInfoFlags
pub const fn empty() -> PrefixInfoFlags
pub const fn empty() -> PrefixInfoFlags
Get a flags value with all bits unset.
pub const fn all() -> PrefixInfoFlags
pub const fn all() -> PrefixInfoFlags
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<PrefixInfoFlags>
pub const fn from_bits(bits: u8) -> Option<PrefixInfoFlags>
Convert from a bits value.
This method will return None if any unknown bits are set.
pub const fn from_bits_truncate(bits: u8) -> PrefixInfoFlags
pub const fn from_bits_truncate(bits: u8) -> PrefixInfoFlags
Convert from a bits value, unsetting any unknown bits.
pub const fn from_bits_retain(bits: u8) -> PrefixInfoFlags
pub const fn from_bits_retain(bits: u8) -> PrefixInfoFlags
Convert from a bits value exactly.
pub fn from_name(name: &str) -> Option<PrefixInfoFlags>
pub fn from_name(name: &str) -> Option<PrefixInfoFlags>
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: PrefixInfoFlags) -> bool
pub const fn intersects(&self, other: PrefixInfoFlags) -> bool
Whether any set bits in other are also set in self.
pub const fn contains(&self, other: PrefixInfoFlags) -> bool
pub const fn contains(&self, other: PrefixInfoFlags) -> bool
Whether all set bits in other are also set in self.
pub fn insert(&mut self, other: PrefixInfoFlags)
pub fn insert(&mut self, other: PrefixInfoFlags)
The bitwise or (|) of the bits in self and other.
pub fn remove(&mut self, other: PrefixInfoFlags)
pub fn remove(&mut self, other: PrefixInfoFlags)
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: PrefixInfoFlags)
pub fn toggle(&mut self, other: PrefixInfoFlags)
The bitwise exclusive-or (^) of the bits in self and other.
pub fn set(&mut self, other: PrefixInfoFlags, value: bool)
pub fn set(&mut self, other: PrefixInfoFlags, value: bool)
Call insert when value is true or remove when value is false.
pub const fn intersection(self, other: PrefixInfoFlags) -> PrefixInfoFlags
pub const fn intersection(self, other: PrefixInfoFlags) -> PrefixInfoFlags
The bitwise and (&) of the bits in self and other.
pub const fn union(self, other: PrefixInfoFlags) -> PrefixInfoFlags
pub const fn union(self, other: PrefixInfoFlags) -> PrefixInfoFlags
The bitwise or (|) of the bits in self and other.
pub const fn difference(self, other: PrefixInfoFlags) -> PrefixInfoFlags
pub const fn difference(self, other: PrefixInfoFlags) -> PrefixInfoFlags
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: PrefixInfoFlags,
) -> PrefixInfoFlags
pub const fn symmetric_difference( self, other: PrefixInfoFlags, ) -> PrefixInfoFlags
The bitwise exclusive-or (^) of the bits in self and other.
pub const fn complement(self) -> PrefixInfoFlags
pub const fn complement(self) -> PrefixInfoFlags
The bitwise negation (!) of the bits in self, truncating the result.
§impl PrefixInfoFlags
impl PrefixInfoFlags
pub const fn iter(&self) -> Iter<PrefixInfoFlags> ⓘ
pub const fn iter(&self) -> Iter<PrefixInfoFlags> ⓘ
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<PrefixInfoFlags> ⓘ
pub const fn iter_names(&self) -> IterNames<PrefixInfoFlags> ⓘ
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 PrefixInfoFlags
impl Binary for PrefixInfoFlags
§impl BitAnd for PrefixInfoFlags
impl BitAnd for PrefixInfoFlags
§fn bitand(self, other: PrefixInfoFlags) -> PrefixInfoFlags
fn bitand(self, other: PrefixInfoFlags) -> PrefixInfoFlags
The bitwise and (&) of the bits in self and other.
§type Output = PrefixInfoFlags
type Output = PrefixInfoFlags
& operator.§impl BitAndAssign for PrefixInfoFlags
impl BitAndAssign for PrefixInfoFlags
§fn bitand_assign(&mut self, other: PrefixInfoFlags)
fn bitand_assign(&mut self, other: PrefixInfoFlags)
The bitwise and (&) of the bits in self and other.
§impl BitOr for PrefixInfoFlags
impl BitOr for PrefixInfoFlags
§fn bitor(self, other: PrefixInfoFlags) -> PrefixInfoFlags
fn bitor(self, other: PrefixInfoFlags) -> PrefixInfoFlags
The bitwise or (|) of the bits in self and other.
§type Output = PrefixInfoFlags
type Output = PrefixInfoFlags
| operator.§impl BitOrAssign for PrefixInfoFlags
impl BitOrAssign for PrefixInfoFlags
§fn bitor_assign(&mut self, other: PrefixInfoFlags)
fn bitor_assign(&mut self, other: PrefixInfoFlags)
The bitwise or (|) of the bits in self and other.
§impl BitXor for PrefixInfoFlags
impl BitXor for PrefixInfoFlags
§fn bitxor(self, other: PrefixInfoFlags) -> PrefixInfoFlags
fn bitxor(self, other: PrefixInfoFlags) -> PrefixInfoFlags
The bitwise exclusive-or (^) of the bits in self and other.
§type Output = PrefixInfoFlags
type Output = PrefixInfoFlags
^ operator.§impl BitXorAssign for PrefixInfoFlags
impl BitXorAssign for PrefixInfoFlags
§fn bitxor_assign(&mut self, other: PrefixInfoFlags)
fn bitxor_assign(&mut self, other: PrefixInfoFlags)
The bitwise exclusive-or (^) of the bits in self and other.
§impl Clone for PrefixInfoFlags
impl Clone for PrefixInfoFlags
§fn clone(&self) -> PrefixInfoFlags
fn clone(&self) -> PrefixInfoFlags
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 PrefixInfoFlags
§impl Debug for PrefixInfoFlags
impl Debug for PrefixInfoFlags
impl Eq for PrefixInfoFlags
§impl Extend<PrefixInfoFlags> for PrefixInfoFlags
impl Extend<PrefixInfoFlags> for PrefixInfoFlags
§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = PrefixInfoFlags>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = PrefixInfoFlags>,
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 PrefixInfoFlags
impl Flags for PrefixInfoFlags
§const FLAGS: &'static [Flag<PrefixInfoFlags>]
const FLAGS: &'static [Flag<PrefixInfoFlags>]
§fn from_bits_retain(bits: u8) -> PrefixInfoFlags
fn from_bits_retain(bits: u8) -> PrefixInfoFlags
§fn all_named() -> PrefixInfoFlags
fn all_named() -> PrefixInfoFlags
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 PrefixInfoFlags
Available on crate feature defmt only.
impl Format for PrefixInfoFlags
defmt only.§impl FromIterator<PrefixInfoFlags> for PrefixInfoFlags
impl FromIterator<PrefixInfoFlags> for PrefixInfoFlags
§fn from_iter<T>(iterator: T) -> PrefixInfoFlagswhere
T: IntoIterator<Item = PrefixInfoFlags>,
fn from_iter<T>(iterator: T) -> PrefixInfoFlagswhere
T: IntoIterator<Item = PrefixInfoFlags>,
The bitwise or (|) of the bits in each flags value.
§impl Hash for PrefixInfoFlags
impl Hash for PrefixInfoFlags
§impl IntoIterator for PrefixInfoFlags
impl IntoIterator for PrefixInfoFlags
§type Item = PrefixInfoFlags
type Item = PrefixInfoFlags
§type IntoIter = Iter<PrefixInfoFlags>
type IntoIter = Iter<PrefixInfoFlags>
§fn into_iter(self) -> <PrefixInfoFlags as IntoIterator>::IntoIter
fn into_iter(self) -> <PrefixInfoFlags as IntoIterator>::IntoIter
§impl LowerHex for PrefixInfoFlags
impl LowerHex for PrefixInfoFlags
§impl Not for PrefixInfoFlags
impl Not for PrefixInfoFlags
§fn not(self) -> PrefixInfoFlags
fn not(self) -> PrefixInfoFlags
The bitwise negation (!) of the bits in self, truncating the result.
§type Output = PrefixInfoFlags
type Output = PrefixInfoFlags
! operator.§impl Octal for PrefixInfoFlags
impl Octal for PrefixInfoFlags
§impl Ord for PrefixInfoFlags
impl Ord for PrefixInfoFlags
§fn cmp(&self, other: &PrefixInfoFlags) -> Ordering
fn cmp(&self, other: &PrefixInfoFlags) -> 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 PrefixInfoFlags
impl PartialEq for PrefixInfoFlags
§impl PartialOrd for PrefixInfoFlags
impl PartialOrd for PrefixInfoFlags
impl StructuralPartialEq for PrefixInfoFlags
§impl Sub for PrefixInfoFlags
impl Sub for PrefixInfoFlags
§fn sub(self, other: PrefixInfoFlags) -> PrefixInfoFlags
fn sub(self, other: PrefixInfoFlags) -> PrefixInfoFlags
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 = PrefixInfoFlags
type Output = PrefixInfoFlags
- operator.§impl SubAssign for PrefixInfoFlags
impl SubAssign for PrefixInfoFlags
§fn sub_assign(&mut self, other: PrefixInfoFlags)
fn sub_assign(&mut self, other: PrefixInfoFlags)
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.