[][src]Struct crosscurses::colorpair::ColorPair

pub struct ColorPair(pub u8);

Trait Implementations

impl BitOr<Attribute> for ColorPair[src]

Implement the | operator for combining a ColorPair and an Attribute to produce Attributes

Example

use crosscurses::Attribute;
use crosscurses::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

The resulting type after applying the | operator.

impl BitOr<ColorPair> for Attributes[src]

Implement the | operator for setting a color pair on an Attributes object

Example

use crosscurses::{Attribute, Attributes};
use crosscurses::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

The resulting type after applying the | operator.

impl BitOr<ColorPair> for Attribute[src]

Implement the | operator for combining an Attribute and a ColorPair to produce Attributes

Example

use crosscurses::Attribute;
use crosscurses::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

The resulting type after applying the | operator.

impl Clone for ColorPair[src]

impl Copy for ColorPair[src]

impl Debug for ColorPair[src]

impl Eq for ColorPair[src]

impl From<ColorPair> for chtype[src]

impl Hash for ColorPair[src]

impl PartialEq<ColorPair> for ColorPair[src]

impl StructuralEq for ColorPair[src]

impl StructuralPartialEq for ColorPair[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.