pub struct AccessLevel(/* private fields */);Expand description
Variable access level.
Implementations§
Source§impl AccessLevel
impl AccessLevel
Sourcepub const CURRENT_READ: AccessLevel
pub const CURRENT_READ: AccessLevel
Read the current value of the node.
Sourcepub const CURRENT_WRITE: AccessLevel
pub const CURRENT_WRITE: AccessLevel
Write the current value of the node.
Sourcepub const HISTORY_READ: AccessLevel
pub const HISTORY_READ: AccessLevel
Read historical values of the node.
Sourcepub const HISTORY_WRITE: AccessLevel
pub const HISTORY_WRITE: AccessLevel
Write historical values of the node.
Sourcepub const SEMANTIC_CHANGE: AccessLevel
pub const SEMANTIC_CHANGE: AccessLevel
Allow changing properties that define semantics of the parent node.
Sourcepub const STATUS_WRITE: AccessLevel
pub const STATUS_WRITE: AccessLevel
Write the status code of the current value.
Sourcepub const TIMESTAMP_WRITE: AccessLevel
pub const TIMESTAMP_WRITE: AccessLevel
Write the timestamp of the current value.
Source§impl AccessLevel
impl AccessLevel
Sourcepub const fn empty() -> AccessLevel
pub const fn empty() -> AccessLevel
Get a flags value with all bits unset.
Sourcepub const fn all() -> AccessLevel
pub const fn all() -> AccessLevel
Get a flags value with all known bits set.
Sourcepub 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.
Sourcepub const fn from_bits(bits: u8) -> Option<AccessLevel>
pub const fn from_bits(bits: u8) -> Option<AccessLevel>
Convert from a bits value.
This method will return None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u8) -> AccessLevel
pub const fn from_bits_truncate(bits: u8) -> AccessLevel
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u8) -> AccessLevel
pub const fn from_bits_retain(bits: u8) -> AccessLevel
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<AccessLevel>
pub fn from_name(name: &str) -> Option<AccessLevel>
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.
Sourcepub const fn intersects(&self, other: AccessLevel) -> bool
pub const fn intersects(&self, other: AccessLevel) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub const fn contains(&self, other: AccessLevel) -> bool
pub const fn contains(&self, other: AccessLevel) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn insert(&mut self, other: AccessLevel)
pub fn insert(&mut self, other: AccessLevel)
The bitwise or (|) of the bits in two flags values.
Sourcepub fn remove(&mut self, other: AccessLevel)
pub fn remove(&mut self, other: AccessLevel)
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.
Sourcepub fn toggle(&mut self, other: AccessLevel)
pub fn toggle(&mut self, other: AccessLevel)
The bitwise exclusive-or (^) of the bits in two flags values.
Sourcepub fn set(&mut self, other: AccessLevel, value: bool)
pub fn set(&mut self, other: AccessLevel, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: AccessLevel) -> AccessLevel
pub const fn intersection(self, other: AccessLevel) -> AccessLevel
The bitwise and (&) of the bits in two flags values.
Sourcepub const fn union(self, other: AccessLevel) -> AccessLevel
pub const fn union(self, other: AccessLevel) -> AccessLevel
The bitwise or (|) of the bits in two flags values.
Sourcepub const fn difference(self, other: AccessLevel) -> AccessLevel
pub const fn difference(self, other: AccessLevel) -> AccessLevel
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.
Sourcepub const fn symmetric_difference(self, other: AccessLevel) -> AccessLevel
pub const fn symmetric_difference(self, other: AccessLevel) -> AccessLevel
The bitwise exclusive-or (^) of the bits in two flags values.
Sourcepub const fn complement(self) -> AccessLevel
pub const fn complement(self) -> AccessLevel
The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§impl AccessLevel
impl AccessLevel
Sourcepub const fn iter(&self) -> Iter<AccessLevel> ⓘ
pub const fn iter(&self) -> Iter<AccessLevel> ⓘ
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.
Sourcepub const fn iter_names(&self) -> IterNames<AccessLevel> ⓘ
pub const fn iter_names(&self) -> IterNames<AccessLevel> ⓘ
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§
Source§impl Binary for AccessLevel
impl Binary for AccessLevel
Source§impl BitAnd for AccessLevel
impl BitAnd for AccessLevel
Source§fn bitand(self, other: AccessLevel) -> AccessLevel
fn bitand(self, other: AccessLevel) -> AccessLevel
The bitwise and (&) of the bits in two flags values.
Source§type Output = AccessLevel
type Output = AccessLevel
& operator.Source§impl BitAndAssign for AccessLevel
impl BitAndAssign for AccessLevel
Source§fn bitand_assign(&mut self, other: AccessLevel)
fn bitand_assign(&mut self, other: AccessLevel)
The bitwise and (&) of the bits in two flags values.
Source§impl BitOr for AccessLevel
impl BitOr for AccessLevel
Source§fn bitor(self, other: AccessLevel) -> AccessLevel
fn bitor(self, other: AccessLevel) -> AccessLevel
The bitwise or (|) of the bits in two flags values.
Source§type Output = AccessLevel
type Output = AccessLevel
| operator.Source§impl BitOrAssign for AccessLevel
impl BitOrAssign for AccessLevel
Source§fn bitor_assign(&mut self, other: AccessLevel)
fn bitor_assign(&mut self, other: AccessLevel)
The bitwise or (|) of the bits in two flags values.
Source§impl BitXor for AccessLevel
impl BitXor for AccessLevel
Source§fn bitxor(self, other: AccessLevel) -> AccessLevel
fn bitxor(self, other: AccessLevel) -> AccessLevel
The bitwise exclusive-or (^) of the bits in two flags values.
Source§type Output = AccessLevel
type Output = AccessLevel
^ operator.Source§impl BitXorAssign for AccessLevel
impl BitXorAssign for AccessLevel
Source§fn bitxor_assign(&mut self, other: AccessLevel)
fn bitxor_assign(&mut self, other: AccessLevel)
The bitwise exclusive-or (^) of the bits in two flags values.
Source§impl Clone for AccessLevel
impl Clone for AccessLevel
Source§fn clone(&self) -> AccessLevel
fn clone(&self) -> AccessLevel
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AccessLevel
impl Debug for AccessLevel
Source§impl Default for AccessLevel
impl Default for AccessLevel
Source§fn default() -> AccessLevel
fn default() -> AccessLevel
Source§impl Extend<AccessLevel> for AccessLevel
impl Extend<AccessLevel> for AccessLevel
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = AccessLevel>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = AccessLevel>,
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)Source§impl Flags for AccessLevel
impl Flags for AccessLevel
Source§const FLAGS: &'static [Flag<AccessLevel>]
const FLAGS: &'static [Flag<AccessLevel>]
Source§fn from_bits_retain(bits: u8) -> AccessLevel
fn from_bits_retain(bits: u8) -> AccessLevel
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.Source§impl FromIterator<AccessLevel> for AccessLevel
impl FromIterator<AccessLevel> for AccessLevel
Source§fn from_iter<T>(iterator: T) -> AccessLevelwhere
T: IntoIterator<Item = AccessLevel>,
fn from_iter<T>(iterator: T) -> AccessLevelwhere
T: IntoIterator<Item = AccessLevel>,
The bitwise or (|) of the bits in each flags value.
Source§impl IntoIterator for AccessLevel
impl IntoIterator for AccessLevel
Source§type Item = AccessLevel
type Item = AccessLevel
Source§type IntoIter = Iter<AccessLevel>
type IntoIter = Iter<AccessLevel>
Source§fn into_iter(self) -> <AccessLevel as IntoIterator>::IntoIter
fn into_iter(self) -> <AccessLevel as IntoIterator>::IntoIter
Source§impl LowerHex for AccessLevel
impl LowerHex for AccessLevel
Source§impl Not for AccessLevel
impl Not for AccessLevel
Source§fn not(self) -> AccessLevel
fn not(self) -> AccessLevel
The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§type Output = AccessLevel
type Output = AccessLevel
! operator.Source§impl Octal for AccessLevel
impl Octal for AccessLevel
Source§impl Sub for AccessLevel
impl Sub for AccessLevel
Source§fn sub(self, other: AccessLevel) -> AccessLevel
fn sub(self, other: AccessLevel) -> AccessLevel
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.
Source§type Output = AccessLevel
type Output = AccessLevel
- operator.Source§impl SubAssign for AccessLevel
impl SubAssign for AccessLevel
Source§fn sub_assign(&mut self, other: AccessLevel)
fn sub_assign(&mut self, other: AccessLevel)
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.