pub struct Attributes { /* private fields */ }
Implementations§
Source§impl Attributes
impl Attributes
pub fn new() -> Attributes
pub fn is_alternative_char_set(&self) -> bool
pub fn set_alternative_char_set(&mut self, enabled: bool)
pub fn is_bold(&self) -> bool
pub fn set_bold(&mut self, enabled: bool)
pub fn is_blink(&self) -> bool
pub fn set_blink(&mut self, enabled: bool)
pub fn is_char_text(&self) -> bool
pub fn set_char_text(&mut self, enabled: bool)
pub fn is_dim(&self) -> bool
pub fn set_dim(&mut self, enabled: bool)
pub fn is_leftline(&self) -> bool
pub fn set_leftline(&mut self, enabled: bool)
pub fn is_invisible(&self) -> bool
pub fn set_invisible(&mut self, enabled: bool)
pub fn is_italic(&self) -> bool
pub fn set_italic(&mut self, enabled: bool)
pub fn is_normal(&self) -> bool
pub fn set_normal(&mut self)
pub fn is_overline(&self) -> bool
pub fn set_overline(&mut self, enabled: bool)
pub fn is_reverse(&self) -> bool
pub fn set_reverse(&mut self, enabled: bool)
pub fn is_rightline(&self) -> bool
pub fn set_rightline(&mut self, enabled: bool)
pub fn is_strikeout(&self) -> bool
pub fn set_strikeout(&mut self, enabled: bool)
pub fn is_underline(&self) -> bool
pub fn set_underline(&mut self, enabled: bool)
pub fn color_pair(&self) -> ColorPair
pub fn set_color_pair(&mut self, color_pair: ColorPair)
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 crosscurses::{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<ColorPair> for Attributes
Implement the | operator for setting a color pair on an Attributes
object
impl BitOr<ColorPair> for Attributes
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);
Source§type Output = Attributes
type Output = Attributes
The resulting type after applying the
|
operator.Source§impl BitOr for Attributes
Implement the | operator for adding Attributes to Attributes
impl BitOr for Attributes
Implement the | operator for adding Attributes to Attributes
§Example
use crosscurses::{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());
Source§type Output = Attributes
type Output = Attributes
The resulting type after applying the
|
operator.Source§fn bitor(self, rhs: Attributes) -> Attributes
fn bitor(self, rhs: Attributes) -> Attributes
Performs the
|
operation. Read moreSource§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 crosscurses::{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 BitXor for Attributes
Implement the ^ operator for removing Attributes from Attributes
impl BitXor for Attributes
Implement the ^ operator for removing Attributes from Attributes
§Example
use crosscurses::{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());
Source§type Output = Attributes
type Output = Attributes
The resulting type after applying the
^
operator.Source§fn bitxor(self, rhs: Attributes) -> Attributes
fn bitxor(self, rhs: Attributes) -> Attributes
Performs the
^
operation. Read moreSource§impl Clone for Attributes
impl Clone for Attributes
Source§fn clone(&self) -> Attributes
fn clone(&self) -> Attributes
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Attributes
impl Debug for Attributes
Source§impl Default for Attributes
Implement Default for Attributes
impl Default for Attributes
Implement Default for Attributes
§Example
use crosscurses::Attributes;
let attributes: Attributes = Default::default();
assert_eq!(attributes, Attributes::new());
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.
Source§impl From<Attributes> for chtype
impl From<Attributes> for chtype
Source§fn from(attributes: Attributes) -> chtype
fn from(attributes: Attributes) -> chtype
Converts to this type from the input type.
Source§impl Hash for Attributes
impl Hash for Attributes
Source§impl PartialEq for Attributes
impl PartialEq for Attributes
impl Copy for Attributes
impl Eq for Attributes
impl StructuralPartialEq for Attributes
Auto Trait Implementations§
impl Freeze for Attributes
impl RefUnwindSafe for Attributes
impl Send for Attributes
impl Sync for Attributes
impl Unpin for Attributes
impl UnwindSafe for Attributes
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