Struct crossterm::style::Attributes
source · pub struct Attributes(/* private fields */);
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 for Attributes
impl BitAnd for Attributes
source§impl BitOr<Attribute> for Attributes
impl BitOr<Attribute> for Attributes
source§impl BitOr for Attributes
impl BitOr for Attributes
source§impl BitXor<Attribute> for Attributes
impl BitXor<Attribute> for Attributes
source§impl BitXor for Attributes
impl BitXor 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 for Attributes
impl PartialEq 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 ==
.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