Struct termimad::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
§type Output = Attributes
type Output = Attributes
The resulting type after applying the
&
operator.source§impl BitAnd<Attributes> for Attributes
impl BitAnd<Attributes> for Attributes
§type Output = Attributes
type Output = Attributes
The resulting type after applying the
&
operator.source§fn bitand(self, rhs: Attributes) -> Attributes
fn bitand(self, rhs: Attributes) -> Attributes
Performs the
&
operation. Read moresource§impl BitOr<Attribute> for Attributes
impl BitOr<Attribute> for Attributes
§type Output = Attributes
type Output = Attributes
The resulting type after applying the
|
operator.source§impl BitOr<Attributes> for Attributes
impl BitOr<Attributes> for Attributes
§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
impl BitXor<Attribute> for Attributes
§type Output = Attributes
type Output = Attributes
The resulting type after applying the
^
operator.source§impl BitXor<Attributes> for Attributes
impl BitXor<Attributes> for Attributes
§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
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§fn from(arr: &[Attribute]) -> Attributes
fn from(arr: &[Attribute]) -> Attributes
Converts to this type from the input type.
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.