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: FieldFlags
pub const SENSITIVE: FieldFlags
Field contains sensitive data (redacted in debug output).
Set by #[facet(sensitive)].
Sourcepub const FLATTEN: FieldFlags
pub const FLATTEN: FieldFlags
Field is flattened into its parent structure.
Set by #[facet(flatten)].
Sourcepub const SKIP: FieldFlags
pub const SKIP: FieldFlags
Field is skipped during both serialization and deserialization.
Set by #[facet(skip)].
Sourcepub const SKIP_SERIALIZING: FieldFlags
pub const SKIP_SERIALIZING: FieldFlags
Field is skipped during serialization only.
Set by #[facet(skip_serializing)].
Sourcepub const SKIP_DESERIALIZING: FieldFlags
pub const SKIP_DESERIALIZING: FieldFlags
Field is skipped during deserialization only.
Set by #[facet(skip_deserializing)].
Sourcepub const CHILD: FieldFlags
pub const CHILD: FieldFlags
Field is a child node (for hierarchical formats like XML).
Set by #[facet(child)].
Sourcepub const RECURSIVE_TYPE: FieldFlags
pub const RECURSIVE_TYPE: FieldFlags
Field has a recursive type that needs lazy shape resolution.
Set by #[facet(recursive_type)].
Sourcepub const fn empty() -> FieldFlags
pub const fn empty() -> FieldFlags
An empty set of flags.
Sourcepub const fn contains(self, other: FieldFlags) -> bool
pub const fn contains(self, other: FieldFlags) -> bool
Returns true if all flags in other are contained in self.
Sourcepub const fn insert(&mut self, other: FieldFlags)
pub const fn insert(&mut self, other: FieldFlags)
Inserts the flags in other into self.
Sourcepub const fn remove(&mut self, other: FieldFlags)
pub const fn remove(&mut self, other: FieldFlags)
Removes the flags in other from self.
Sourcepub const fn union(self, other: FieldFlags) -> FieldFlags
pub const fn union(self, other: FieldFlags) -> FieldFlags
Returns the union of self and other.
Sourcepub const fn intersection(self, other: FieldFlags) -> FieldFlags
pub const fn intersection(self, other: FieldFlags) -> FieldFlags
Returns the intersection of self and other.
Sourcepub const fn from_bits_retain(bits: u16) -> FieldFlags
pub const fn from_bits_retain(bits: u16) -> FieldFlags
Creates from raw bits (unchecked).
Trait Implementations§
Source§impl BitAnd for FieldFlags
impl BitAnd for FieldFlags
Source§type Output = FieldFlags
type Output = FieldFlags
& operator.Source§fn bitand(self, rhs: FieldFlags) -> FieldFlags
fn bitand(self, rhs: FieldFlags) -> FieldFlags
& operation. Read moreSource§impl BitAndAssign for FieldFlags
impl BitAndAssign for FieldFlags
Source§fn bitand_assign(&mut self, rhs: FieldFlags)
fn bitand_assign(&mut self, rhs: FieldFlags)
&= operation. Read moreSource§impl BitOr for FieldFlags
impl BitOr for FieldFlags
Source§type Output = FieldFlags
type Output = FieldFlags
| operator.Source§fn bitor(self, rhs: FieldFlags) -> FieldFlags
fn bitor(self, rhs: FieldFlags) -> FieldFlags
| operation. Read moreSource§impl BitOrAssign for FieldFlags
impl BitOrAssign for FieldFlags
Source§fn bitor_assign(&mut self, rhs: FieldFlags)
fn bitor_assign(&mut self, rhs: FieldFlags)
|= operation. Read moreSource§impl BitXor for FieldFlags
impl BitXor for FieldFlags
Source§type Output = FieldFlags
type Output = FieldFlags
^ operator.Source§fn bitxor(self, rhs: FieldFlags) -> FieldFlags
fn bitxor(self, rhs: FieldFlags) -> FieldFlags
^ operation. Read moreSource§impl BitXorAssign for FieldFlags
impl BitXorAssign for FieldFlags
Source§fn bitxor_assign(&mut self, rhs: FieldFlags)
fn bitxor_assign(&mut self, rhs: FieldFlags)
^= operation. Read moreSource§impl Clone for FieldFlags
impl Clone for FieldFlags
Source§fn clone(&self) -> FieldFlags
fn clone(&self) -> FieldFlags
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 FieldFlags
Source§impl Debug for FieldFlags
impl Debug for FieldFlags
Source§impl Default for FieldFlags
impl Default for FieldFlags
Source§fn default() -> FieldFlags
fn default() -> FieldFlags
impl Eq for FieldFlags
Source§impl Hash for FieldFlags
impl Hash for FieldFlags
Source§impl Not for FieldFlags
impl Not for FieldFlags
Source§type Output = FieldFlags
type Output = FieldFlags
! operator.Source§fn not(self) -> FieldFlags
fn not(self) -> FieldFlags
! operation. Read moreSource§impl PartialEq for FieldFlags
impl PartialEq for FieldFlags
impl StructuralPartialEq for FieldFlags
Auto Trait Implementations§
impl Freeze for FieldFlags
impl RefUnwindSafe for FieldFlags
impl Send for FieldFlags
impl Sync for FieldFlags
impl Unpin for FieldFlags
impl UnsafeUnpin for FieldFlags
impl UnwindSafe for FieldFlags
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.