Struct ncursesw::extend::Attributes [−][src]
pub struct Attributes { /* fields omitted */ }
Trait Implementations
Implement the | operator for adding an Attribute to Attributes
Example
let mut attributes = Attributes::default();
assert!(!attributes.is_bold());
attributes = attributes | Attribute::Bold;
assert!(attributes.is_bold());
Implement the | operator for adding Attributes to Attributes
Example
let mut attributes = Attributes::default() | Attribute::Bold;
let other = Attributes::default() | Attribute::Reverse;
attributes = attributes | other;
assert!(attributes.is_bold());
assert!(attributes.is_reverse());
assert!(!attributes.is_dim());
Implement the ^ operator for disabling an Attribute from Attributes
Example
let mut attributes = Attributes::from(Attribute::Bold);
assert!(attributes.is_bold());
attributes = attributes ^ Attribute::Bold;
assert!(!attributes.is_bold());
Implement the ^ operator for removing Attributes from Attributes
Example
let mut attributes = Attributes::default() | Attribute::Blink | Attribute::Bold;
let other = Attributes::default() | Attribute::Reverse | Attribute::Bold;
attributes = attributes ^ other;
assert!(!attributes.is_bold());
assert!(attributes.is_reverse());
assert!(attributes.is_blink());
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for Attributes
impl Send for Attributes
impl Sync for Attributes
impl Unpin for Attributes
impl UnwindSafe for Attributes
Blanket Implementations
Mutably borrows from an owned value. Read more