Struct pancurses::colorpair::ColorPair [−][src]
pub struct ColorPair(pub u8);
Tuple Fields
0: u8
Trait Implementations
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 setting a color pair on an Attributes
object
Example
use pancurses::{Attribute, Attributes};
use pancurses::colorpair::ColorPair;
let mut attributes = Attributes::new();
assert!(attributes.color_pair().0 == 0);
attributes = attributes | ColorPair(1);
assert!(attributes.color_pair().0 == 1);
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
Auto Trait Implementations
impl RefUnwindSafe for ColorPair
impl UnwindSafe for ColorPair
Blanket Implementations
Mutably borrows from an owned value. Read more