pub struct ColorPair(pub u8);
Tuple Fields
0: u8
Trait Implementations
sourceimpl BitOr<Attribute> for ColorPair
impl BitOr<Attribute> for ColorPair
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.sourcefn bitor(self, rhs: Attribute) -> Attributes
fn bitor(self, rhs: Attribute) -> Attributes
Performs the
|
operation. Read moresourceimpl BitOr<ColorPair> for Attribute
impl BitOr<ColorPair> for Attribute
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.sourcefn bitor(self, rhs: ColorPair) -> Attributes
fn bitor(self, rhs: ColorPair) -> Attributes
Performs the
|
operation. Read moresourceimpl BitOr<ColorPair> for Attributes
impl BitOr<ColorPair> for Attributes
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.sourcefn bitor(self, rhs: ColorPair) -> Attributes
fn bitor(self, rhs: ColorPair) -> Attributes
Performs the
|
operation. Read moreimpl Copy for ColorPair
impl Eq for ColorPair
impl StructuralEq for ColorPair
impl StructuralPartialEq for ColorPair
Auto Trait Implementations
impl RefUnwindSafe for ColorPair
impl Send for ColorPair
impl Sync for ColorPair
impl Unpin for ColorPair
impl UnwindSafe for ColorPair
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more