pub struct Tag(/* private fields */);Expand description
Message tag definitions.
Implementations§
Source§impl Tag
impl Tag
Sourcepub const PUSH: Self
pub const PUSH: Self
Indicates the message marks the end of a series of messages in a stream, but not the end of the stream.
Sourcepub const fn from_bits(bits: u8) -> Option<Self>
pub const fn from_bits(bits: u8) -> Option<Self>
Convert from a bits value, returning None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u8) -> Self
pub const fn from_bits_truncate(bits: u8) -> Self
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u8) -> Self
pub const fn from_bits_retain(bits: u8) -> Self
Convert from a bits value exactly.
Values containing unknown bits are rejected when passed to
DryocStream::push, and authenticated
unknown tags are rejected by Rustaceous pull streams.
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
Get a flags value with the bits of a flag with the given name set.
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn remove(&mut self, other: Self)
pub fn remove(&mut self, other: Self)
The intersection of a source flags value with the complement of a target
flags value (&!).
Sourcepub fn toggle(&mut self, other: Self)
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^) of the bits in two flags values.
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
The bitwise and (&) of the bits in two flags values.
Sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
The bitwise or (|) of the bits in two flags values.
Sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target
flags value (&!).
Sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
The bitwise exclusive-or (^) of the bits in two flags values.
Sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
The bitwise negation (!) of the bits in a flags value, truncating the
result.
Sourcepub const fn iter_names(&self) -> TagIterNames ⓘ
pub const fn iter_names(&self) -> TagIterNames ⓘ
Yield a set of contained named flags values.
Trait Implementations§
Source§impl BitAndAssign for Tag
impl BitAndAssign for Tag
Source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
&= operation. Read moreSource§impl BitOrAssign for Tag
impl BitOrAssign for Tag
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
|= operation. Read moreSource§impl BitXorAssign for Tag
impl BitXorAssign for Tag
Source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
^= operation. Read moreimpl Copy for Tag
impl Eq for Tag
Source§impl Extend<Tag> for Tag
impl Extend<Tag> for Tag
Source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iter: T)
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 FromIterator<Tag> for Tag
impl FromIterator<Tag> for Tag
Source§fn from_iter<T: IntoIterator<Item = Self>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iter: T) -> Self
Source§impl IntoIterator for Tag
impl IntoIterator for Tag
impl StructuralPartialEq for Tag
Source§impl SubAssign for Tag
impl SubAssign for Tag
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
-= operation. Read more