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.is_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 is_sensitive(&self) -> bool
pub fn is_sensitive(&self) -> bool
Returns true if the sensitive flag is set
Sourcepub fn set_sensitive(&mut self) -> &mut Self
pub fn set_sensitive(&mut self) -> &mut Self
Sets the sensitive flag and returns self for chaining
Sourcepub fn unset_sensitive(&mut self) -> &mut Self
pub fn unset_sensitive(&mut self) -> &mut Self
Unsets the sensitive flag and returns self for chaining
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 copy 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