Enum pancurses::Attribute [−][src]
pub enum Attribute {
Show 14 variants
AlternativeCharSet,
Bold,
Blink,
CharText,
Dim,
Leftline,
Invisible,
Italic,
Normal,
Overline,
Reverse,
Rightline,
Strikeout,
Underline,
}
Variants
Trait Implementations
Implement the | operator for adding an Attribute to Attributes
Example
use pancurses::{Attribute, Attributes};
let mut attributes = Attributes::new();
assert!(!attributes.is_bold());
attributes = attributes | Attribute::Bold;
assert!(attributes.is_bold());
type Output = Attributes
type Output = Attributes
The resulting type after applying the |
operator.
Performs the |
operation. Read more
Implement the | operator for combining two ’Attribute’s into Attributes
Example
use pancurses::{Attribute, Attributes};
let attributes = Attribute::Blink | Attribute::Reverse;
assert!(!attributes.is_bold());
assert!(attributes.is_blink());
assert!(attributes.is_reverse());
type Output = Attributes
type Output = Attributes
The resulting type after applying the |
operator.
Performs the |
operation. Read more
Implement the | operator for combining a ColorPair
and an Attribute
to produce Attributes
Example
use pancurses::Attribute;
use pancurses::colorpair::ColorPair;
let attributes = ColorPair(5) | Attribute::Blink;
assert!(attributes.color_pair().0 == 5);
assert!(!attributes.is_bold());
assert!(attributes.is_blink());
type Output = Attributes
type Output = Attributes
The resulting type after applying the |
operator.
Performs the |
operation. Read more
Implement the | operator for combining an Attribute
and a ColorPair
to produce Attributes
Example
use pancurses::Attribute;
use pancurses::colorpair::ColorPair;
let attributes = Attribute::Blink | ColorPair(2);
assert!(attributes.color_pair().0 == 2);
assert!(!attributes.is_bold());
assert!(attributes.is_blink());
type Output = Attributes
type Output = Attributes
The resulting type after applying the |
operator.
Performs the |
operation. Read more
Implement the ^ operator for disabling an Attribute from Attributes
Example
use pancurses::{Attribute, Attributes};
let mut attributes = Attributes::from(Attribute::Bold);
assert!(attributes.is_bold());
attributes = attributes ^ Attribute::Bold;
assert!(!attributes.is_bold());
type Output = Attributes
type Output = Attributes
The resulting type after applying the ^
operator.
Performs the ^
operation. Read more
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Attribute
impl UnwindSafe for Attribute
Blanket Implementations
Mutably borrows from an owned value. Read more