pub struct FieldFlags(/* private fields */);
Expand description
Flags that can be applied to fields to modify their behavior
§Examples
use shapely_core::FieldFlags;
// Create flags with the sensitive bit set
let flags = FieldFlags::SENSITIVE;
assert!(flags.contains(FieldFlags::SENSITIVE));
// Combine multiple flags using bitwise OR
let flags = FieldFlags::SENSITIVE | FieldFlags::EMPTY;
Implementations§
Source§impl FieldFlags
impl FieldFlags
Sourcepub const SENSITIVE: Self
pub const SENSITIVE: Self
Flag indicating this field contains sensitive data that should not be displayed
Sourcepub fn contains(&self, flag: FieldFlags) -> bool
pub fn contains(&self, flag: FieldFlags) -> bool
Returns true if the given flag is set
Sourcepub fn set_flag(&mut self, flag: FieldFlags) -> &mut Self
pub fn set_flag(&mut self, flag: FieldFlags) -> &mut Self
Sets the given flag and returns self for chaining
Sourcepub fn unset_flag(&mut self, flag: FieldFlags) -> &mut Self
pub fn unset_flag(&mut self, flag: FieldFlags) -> &mut Self
Unsets the given flag and returns self for chaining
Sourcepub const fn with_flag(flag: FieldFlags) -> Self
pub const fn with_flag(flag: FieldFlags) -> Self
Creates a new FieldFlags with the given flag set
Trait Implementations§
Source§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)
Performs the
|=
operation. Read moreSource§impl Clone for FieldFlags
impl Clone for FieldFlags
Source§fn clone(&self) -> FieldFlags
fn clone(&self) -> FieldFlags
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 FieldFlags
impl Debug for FieldFlags
Source§impl Default for FieldFlags
impl Default for FieldFlags
Source§impl Display for FieldFlags
impl Display for FieldFlags
Source§impl Hash for FieldFlags
impl Hash for FieldFlags
Source§impl PartialEq for FieldFlags
impl PartialEq for FieldFlags
impl Copy for FieldFlags
impl Eq 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 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
Mutably borrows from an owned value. Read more