Enum pancurses_result::Attribute
source · 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
sourceimpl BitOr<Attribute> for Attribute
impl BitOr<Attribute> 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());
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<Attribute> for 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());
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<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 BitXor<Attribute> for 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());
type Output = Attributes
type Output = Attributes
The resulting type after applying the
^
operator.sourcefn bitxor(self, rhs: Attribute) -> Attributes
fn bitxor(self, rhs: Attribute) -> Attributes
Performs the
^
operation. Read moresourceimpl From<Attribute> for Attributes
impl From<Attribute> for Attributes
sourcefn 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 StructuralEq for Attribute
impl StructuralPartialEq for Attribute
Auto Trait Implementations
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnwindSafe for Attribute
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