Struct pancurses::Attributes[][src]

pub struct Attributes { /* fields omitted */ }

Methods

impl Attributes
[src]

Trait Implementations

impl Copy for Attributes
[src]

impl Clone for Attributes
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Attributes
[src]

Formats the value using the given formatter. Read more

impl PartialEq for Attributes
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Attributes
[src]

impl Hash for Attributes
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl BitOr<Attribute> for Attributes
[src]

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());

The resulting type after applying the | operator.

Performs the | operation.

impl BitXor<Attribute> for Attributes
[src]

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());

The resulting type after applying the ^ operator.

Performs the ^ operation.

impl BitOr for Attributes
[src]

Implement the | operator for adding Attributes to Attributes

Example

use pancurses::{Attribute, Attributes};

let mut attributes = Attributes::new() | Attribute::Bold;
let other = Attributes::new() | Attribute::Reverse;
attributes = attributes | other;
assert!(attributes.is_bold());
assert!(attributes.is_reverse());
assert!(!attributes.is_italic());

The resulting type after applying the | operator.

Performs the | operation.

impl BitXor for Attributes
[src]

Implement the ^ operator for removing Attributes from Attributes

Example

use pancurses::{Attribute, Attributes};

let mut attributes = Attributes::new() | Attribute::Blink | Attribute::Bold;
let other = Attributes::new() | Attribute::Reverse | Attribute::Bold;
attributes = attributes ^ other;
assert!(!attributes.is_bold());
assert!(attributes.is_reverse());
assert!(attributes.is_blink());

The resulting type after applying the ^ operator.

Performs the ^ operation.

impl Default for Attributes
[src]

Implement Default for Attributes

Example

use pancurses::Attributes;
let attributes: Attributes = Default::default();
assert_eq!(attributes, Attributes::new());

Returns the "default value" for a type. Read more

impl From<Attribute> for Attributes
[src]

Performs the conversion.

impl From<Attributes> for chtype
[src]

Performs the conversion.

impl BitOr<ColorPair> for Attributes
[src]

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);

The resulting type after applying the | operator.

Performs the | operation.

Auto Trait Implementations

impl Send for Attributes

impl Sync for Attributes