Struct crossterm::style::Attributes
source · pub struct Attributes(_);
Expand description
a bitset for all possible attributes
Implementations§
source§impl Attributes
impl Attributes
sourcepub fn set(&mut self, attribute: Attribute)
pub fn set(&mut self, attribute: Attribute)
Sets the attribute. If it’s already set, this does nothing.
sourcepub fn unset(&mut self, attribute: Attribute)
pub fn unset(&mut self, attribute: Attribute)
Unsets the attribute. If it’s not set, this changes nothing.
sourcepub fn toggle(&mut self, attribute: Attribute)
pub fn toggle(&mut self, attribute: Attribute)
Sets the attribute if it’s unset, unset it if it is set.
sourcepub fn extend(&mut self, attributes: Attributes)
pub fn extend(&mut self, attributes: Attributes)
Sets all the passed attributes. Removes none.
Trait Implementations§
source§impl BitAnd<Attribute> for Attributes
impl BitAnd<Attribute> for Attributes
source§impl BitAnd<Attributes> for Attributes
impl BitAnd<Attributes> for Attributes
source§impl BitOr<Attribute> for Attributes
impl BitOr<Attribute> for Attributes
source§impl BitOr<Attributes> for Attributes
impl BitOr<Attributes> for Attributes
source§impl BitXor<Attribute> for Attributes
impl BitXor<Attribute> for Attributes
source§impl BitXor<Attributes> for Attributes
impl BitXor<Attributes> for Attributes
source§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
impl Default for Attributes
source§fn default() -> Attributes
fn default() -> Attributes
Returns the “default value” for a type. Read more
source§impl From<&[Attribute]> for Attributes
impl From<&[Attribute]> for Attributes
source§impl From<Attribute> for Attributes
impl From<Attribute> for Attributes
source§impl PartialEq<Attributes> for Attributes
impl PartialEq<Attributes> for Attributes
source§fn eq(&self, other: &Attributes) -> bool
fn eq(&self, other: &Attributes) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.