Struct NodeCapabilities
pub struct NodeCapabilities(/* private fields */);Implementations§
§impl NodeCapabilities
impl NodeCapabilities
pub const REPEATER: NodeCapabilities
pub const MOBILE: NodeCapabilities
pub const TEXT_MESSAGES: NodeCapabilities
pub const TELEMETRY: NodeCapabilities
pub const CHAT_ROOM: NodeCapabilities
pub const COAP: NodeCapabilities
§impl NodeCapabilities
impl NodeCapabilities
pub const fn empty() -> NodeCapabilities
pub const fn empty() -> NodeCapabilities
Get a flags value with all bits unset.
pub const fn all() -> NodeCapabilities
pub const fn all() -> NodeCapabilities
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<NodeCapabilities>
pub const fn from_bits(bits: u8) -> Option<NodeCapabilities>
Convert from a bits value.
This method will return None if any unknown bits are set.
pub const fn from_bits_truncate(bits: u8) -> NodeCapabilities
pub const fn from_bits_truncate(bits: u8) -> NodeCapabilities
Convert from a bits value, unsetting any unknown bits.
pub const fn from_bits_retain(bits: u8) -> NodeCapabilities
pub const fn from_bits_retain(bits: u8) -> NodeCapabilities
Convert from a bits value exactly.
pub fn from_name(name: &str) -> Option<NodeCapabilities>
pub fn from_name(name: &str) -> Option<NodeCapabilities>
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: NodeCapabilities) -> bool
pub const fn intersects(&self, other: NodeCapabilities) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
pub const fn contains(&self, other: NodeCapabilities) -> bool
pub const fn contains(&self, other: NodeCapabilities) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
pub fn insert(&mut self, other: NodeCapabilities)
pub fn insert(&mut self, other: NodeCapabilities)
The bitwise or (|) of the bits in two flags values.
pub fn remove(&mut self, other: NodeCapabilities)
pub fn remove(&mut self, other: NodeCapabilities)
The intersection of a source flags value with the complement of a target flags
value (&!).
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: NodeCapabilities)
pub fn toggle(&mut self, other: NodeCapabilities)
The bitwise exclusive-or (^) of the bits in two flags values.
pub fn set(&mut self, other: NodeCapabilities, value: bool)
pub fn set(&mut self, other: NodeCapabilities, value: bool)
Call insert when value is true or remove when value is false.
pub const fn intersection(self, other: NodeCapabilities) -> NodeCapabilities
pub const fn intersection(self, other: NodeCapabilities) -> NodeCapabilities
The bitwise and (&) of the bits in two flags values.
pub const fn union(self, other: NodeCapabilities) -> NodeCapabilities
pub const fn union(self, other: NodeCapabilities) -> NodeCapabilities
The bitwise or (|) of the bits in two flags values.
pub const fn difference(self, other: NodeCapabilities) -> NodeCapabilities
pub const fn difference(self, other: NodeCapabilities) -> NodeCapabilities
The intersection of a source flags value with the complement of a target flags
value (&!).
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: NodeCapabilities,
) -> NodeCapabilities
pub const fn symmetric_difference( self, other: NodeCapabilities, ) -> NodeCapabilities
The bitwise exclusive-or (^) of the bits in two flags values.
pub const fn complement(self) -> NodeCapabilities
pub const fn complement(self) -> NodeCapabilities
The bitwise negation (!) of the bits in a flags value, truncating the result.
§impl NodeCapabilities
impl NodeCapabilities
pub const fn iter(&self) -> Iter<NodeCapabilities>
pub const fn iter(&self) -> Iter<NodeCapabilities>
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<NodeCapabilities>
pub const fn iter_names(&self) -> IterNames<NodeCapabilities>
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 NodeCapabilities
impl Binary for NodeCapabilities
§impl BitAnd for NodeCapabilities
impl BitAnd for NodeCapabilities
§fn bitand(self, other: NodeCapabilities) -> NodeCapabilities
fn bitand(self, other: NodeCapabilities) -> NodeCapabilities
The bitwise and (&) of the bits in two flags values.
§type Output = NodeCapabilities
type Output = NodeCapabilities
& operator.§impl BitAndAssign for NodeCapabilities
impl BitAndAssign for NodeCapabilities
§fn bitand_assign(&mut self, other: NodeCapabilities)
fn bitand_assign(&mut self, other: NodeCapabilities)
The bitwise and (&) of the bits in two flags values.
§impl BitOr for NodeCapabilities
impl BitOr for NodeCapabilities
§fn bitor(self, other: NodeCapabilities) -> NodeCapabilities
fn bitor(self, other: NodeCapabilities) -> NodeCapabilities
The bitwise or (|) of the bits in two flags values.
§type Output = NodeCapabilities
type Output = NodeCapabilities
| operator.§impl BitOrAssign for NodeCapabilities
impl BitOrAssign for NodeCapabilities
§fn bitor_assign(&mut self, other: NodeCapabilities)
fn bitor_assign(&mut self, other: NodeCapabilities)
The bitwise or (|) of the bits in two flags values.
§impl BitXor for NodeCapabilities
impl BitXor for NodeCapabilities
§fn bitxor(self, other: NodeCapabilities) -> NodeCapabilities
fn bitxor(self, other: NodeCapabilities) -> NodeCapabilities
The bitwise exclusive-or (^) of the bits in two flags values.
§type Output = NodeCapabilities
type Output = NodeCapabilities
^ operator.§impl BitXorAssign for NodeCapabilities
impl BitXorAssign for NodeCapabilities
§fn bitxor_assign(&mut self, other: NodeCapabilities)
fn bitxor_assign(&mut self, other: NodeCapabilities)
The bitwise exclusive-or (^) of the bits in two flags values.
§impl Clone for NodeCapabilities
impl Clone for NodeCapabilities
§fn clone(&self) -> NodeCapabilities
fn clone(&self) -> NodeCapabilities
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for NodeCapabilities
impl Debug for NodeCapabilities
§impl Extend<NodeCapabilities> for NodeCapabilities
impl Extend<NodeCapabilities> for NodeCapabilities
§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = NodeCapabilities>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = NodeCapabilities>,
The bitwise or (|) of the bits in each flags value.
§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)§impl Flags for NodeCapabilities
impl Flags for NodeCapabilities
§const FLAGS: &'static [Flag<NodeCapabilities>]
const FLAGS: &'static [Flag<NodeCapabilities>]
§fn from_bits_retain(bits: u8) -> NodeCapabilities
fn from_bits_retain(bits: u8) -> NodeCapabilities
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 intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in two flags values.Source§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!). Read moreSource§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in two flags values.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in two flags values.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!). Read moreSource§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in two flags values.Source§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in a flags value, truncating the result.§impl FromIterator<NodeCapabilities> for NodeCapabilities
impl FromIterator<NodeCapabilities> for NodeCapabilities
§fn from_iter<T>(iterator: T) -> NodeCapabilitieswhere
T: IntoIterator<Item = NodeCapabilities>,
fn from_iter<T>(iterator: T) -> NodeCapabilitieswhere
T: IntoIterator<Item = NodeCapabilities>,
The bitwise or (|) of the bits in each flags value.
§impl IntoIterator for NodeCapabilities
impl IntoIterator for NodeCapabilities
§type Item = NodeCapabilities
type Item = NodeCapabilities
§type IntoIter = Iter<NodeCapabilities>
type IntoIter = Iter<NodeCapabilities>
§fn into_iter(self) -> <NodeCapabilities as IntoIterator>::IntoIter
fn into_iter(self) -> <NodeCapabilities as IntoIterator>::IntoIter
§impl LowerHex for NodeCapabilities
impl LowerHex for NodeCapabilities
§impl Not for NodeCapabilities
impl Not for NodeCapabilities
§fn not(self) -> NodeCapabilities
fn not(self) -> NodeCapabilities
The bitwise negation (!) of the bits in a flags value, truncating the result.
§type Output = NodeCapabilities
type Output = NodeCapabilities
! operator.§impl Octal for NodeCapabilities
impl Octal for NodeCapabilities
§impl PartialEq for NodeCapabilities
impl PartialEq for NodeCapabilities
§impl Sub for NodeCapabilities
impl Sub for NodeCapabilities
§fn sub(self, other: NodeCapabilities) -> NodeCapabilities
fn sub(self, other: NodeCapabilities) -> NodeCapabilities
The intersection of a source flags value with the complement of a target flags value (&!).
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 = NodeCapabilities
type Output = NodeCapabilities
- operator.§impl SubAssign for NodeCapabilities
impl SubAssign for NodeCapabilities
§fn sub_assign(&mut self, other: NodeCapabilities)
fn sub_assign(&mut self, other: NodeCapabilities)
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
§impl UpperHex for NodeCapabilities
impl UpperHex for NodeCapabilities
impl Copy for NodeCapabilities
impl Eq for NodeCapabilities
impl StructuralPartialEq for NodeCapabilities
Auto Trait Implementations§
impl Freeze for NodeCapabilities
impl RefUnwindSafe for NodeCapabilities
impl Send for NodeCapabilities
impl Sync for NodeCapabilities
impl Unpin for NodeCapabilities
impl UnwindSafe for NodeCapabilities
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)