[][src]Struct pancurses::Attributes

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

Blanket Implementations

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

Performs the conversion.

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

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> From for T
[src]

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Important traits for &'a mut R

Immutably borrows from an owned value. Read more

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

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Important traits for &'a mut R

Mutably borrows from an owned value. Read more