pub struct FieldFlags(/* private fields */);Expand description
Bit flags for common field attributes.
These provide O(1) access to frequently-checked boolean attributes, avoiding the O(n) linear scan through the attributes slice.
Implementations§
Source§impl FieldFlags
impl FieldFlags
Sourcepub const SENSITIVE: Self
pub const SENSITIVE: Self
Field contains sensitive data (redacted in debug output).
Set by #[facet(sensitive)].
Sourcepub const FLATTEN: Self
pub const FLATTEN: Self
Field is flattened into its parent structure.
Set by #[facet(flatten)].
Sourcepub const SKIP: Self
pub const SKIP: Self
Field is skipped during both serialization and deserialization.
Set by #[facet(skip)].
Sourcepub const SKIP_SERIALIZING: Self
pub const SKIP_SERIALIZING: Self
Field is skipped during serialization only.
Set by #[facet(skip_serializing)].
Sourcepub const SKIP_DESERIALIZING: Self
pub const SKIP_DESERIALIZING: Self
Field is skipped during deserialization only.
Set by #[facet(skip_deserializing)].
Sourcepub const CHILD: Self
pub const CHILD: Self
Field is a child node (for hierarchical formats like KDL/XML).
Set by #[facet(child)].
Sourcepub const RECURSIVE_TYPE: Self
pub const RECURSIVE_TYPE: Self
Field has a recursive type that needs lazy shape resolution.
Set by #[facet(recursive_type)].
Sourcepub const fn contains(self, other: Self) -> bool
pub const fn contains(self, other: Self) -> bool
Returns true if all flags in other are contained in self.
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
Returns the intersection of self and other.
Sourcepub const fn from_bits_retain(bits: u16) -> Self
pub const fn from_bits_retain(bits: u16) -> Self
Creates from raw bits (unchecked).
Trait Implementations§
Source§impl BitAnd for FieldFlags
impl BitAnd for FieldFlags
Source§impl BitAndAssign for FieldFlags
impl BitAndAssign for FieldFlags
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&= operation. Read moreSource§impl BitOr for FieldFlags
impl BitOr for FieldFlags
Source§impl BitOrAssign for FieldFlags
impl BitOrAssign for FieldFlags
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|= operation. Read moreSource§impl BitXor for FieldFlags
impl BitXor for FieldFlags
Source§impl BitXorAssign for FieldFlags
impl BitXorAssign for FieldFlags
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^= operation. Read moreSource§impl Clone for FieldFlags
impl Clone for FieldFlags
Source§fn clone(&self) -> FieldFlags
fn clone(&self) -> FieldFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more