pub struct ShapeFlags(/* private fields */);Expand description
Bit flags for common shape-level attributes.
These provide O(1) access to frequently-checked boolean attributes, avoiding the O(n) linear scan through the attributes slice.
Implementations§
Source§impl ShapeFlags
impl ShapeFlags
Sourcepub const UNTAGGED: Self
pub const UNTAGGED: Self
Enum is untagged (no discriminant in serialized form).
Set by #[facet(untagged)].
Sourcepub const NUMERIC: Self
pub const NUMERIC: Self
Serializes/Deserializers enum to/from integer based on variant discriminant,
Set by #[facet(is_numeric)].
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 ShapeFlags
impl BitAnd for ShapeFlags
Source§impl BitAndAssign for ShapeFlags
impl BitAndAssign for ShapeFlags
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moreSource§impl BitOr for ShapeFlags
impl BitOr for ShapeFlags
Source§impl BitOrAssign for ShapeFlags
impl BitOrAssign for ShapeFlags
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreSource§impl BitXor for ShapeFlags
impl BitXor for ShapeFlags
Source§impl BitXorAssign for ShapeFlags
impl BitXorAssign for ShapeFlags
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moreSource§impl Clone for ShapeFlags
impl Clone for ShapeFlags
Source§fn clone(&self) -> ShapeFlags
fn clone(&self) -> ShapeFlags
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShapeFlags
impl Debug for ShapeFlags
Source§impl Default for ShapeFlags
impl Default for ShapeFlags
Source§fn default() -> ShapeFlags
fn default() -> ShapeFlags
Returns the “default value” for a type. Read more
Source§impl Hash for ShapeFlags
impl Hash for ShapeFlags
Source§impl Not for ShapeFlags
impl Not for ShapeFlags
Source§impl PartialEq for ShapeFlags
impl PartialEq for ShapeFlags
impl Copy for ShapeFlags
impl Eq for ShapeFlags
impl StructuralPartialEq for ShapeFlags
Auto Trait Implementations§
impl Freeze for ShapeFlags
impl RefUnwindSafe for ShapeFlags
impl Send for ShapeFlags
impl Sync for ShapeFlags
impl Unpin for ShapeFlags
impl UnwindSafe for ShapeFlags
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
Mutably borrows from an owned value. Read more