pub enum Attribute {
Show 14 variants
AlternativeCharSet,
Bold,
Blink,
CharText,
Dim,
Leftline,
Invisible,
Italic,
Normal,
Overline,
Reverse,
Rightline,
Strikeout,
Underline,
}
Variants§
AlternativeCharSet
Bold
Blink
CharText
Dim
Leftline
Invisible
Italic
Normal
Overline
Reverse
Rightline
Strikeout
Underline
Trait Implementations§
Source§impl BitOr<Attribute> for Attributes
Implement the | operator for adding an Attribute to Attributes
impl BitOr<Attribute> for Attributes
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());
Source§type Output = Attributes
type Output = Attributes
The resulting type after applying the
|
operator.Source§impl BitOr<Attribute> for ColorPair
Implement the | operator for combining a ColorPair
and an Attribute
to produce Attributes
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());
Source§type Output = Attributes
type Output = Attributes
The resulting type after applying the
|
operator.Source§impl BitOr<ColorPair> for Attribute
Implement the | operator for combining an Attribute
and a ColorPair
to produce Attributes
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());
Source§type Output = Attributes
type Output = Attributes
The resulting type after applying the
|
operator.Source§impl BitOr for Attribute
Implement the | operator for combining two ’Attribute’s into Attributes
impl BitOr for Attribute
Implement the | operator for combining two ’Attribute’s into Attributes
§Example
use pancurses::{Attribute, Attributes};
let attributes = Attribute::Blink | Attribute::Reverse;
assert!(!attributes.is_bold());
assert!(attributes.is_blink());
assert!(attributes.is_reverse());
Source§type Output = Attributes
type Output = Attributes
The resulting type after applying the
|
operator.Source§impl BitXor<Attribute> for Attributes
Implement the ^ operator for disabling an Attribute from Attributes
impl BitXor<Attribute> for Attributes
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());
Source§type Output = Attributes
type Output = Attributes
The resulting type after applying the
^
operator.Source§impl From<Attribute> for Attributes
impl From<Attribute> for Attributes
Source§fn from(attribute: Attribute) -> Attributes
fn from(attribute: Attribute) -> Attributes
Converts to this type from the input type.
impl Copy for Attribute
impl Eq for Attribute
impl StructuralPartialEq for Attribute
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnwindSafe for Attribute
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more