Struct crossterm::style::Attributes
source · [−]pub struct Attributes(_);
Expand description
a bitset for all possible attributes
Implementations
sourceimpl 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
sourceimpl BitAnd<Attribute> for Attributes
impl BitAnd<Attribute> for Attributes
sourceimpl BitAnd<Attributes> for Attributes
impl BitAnd<Attributes> for Attributes
type Output = Attributes
type Output = Attributes
The resulting type after applying the &
operator.
sourceimpl BitOr<Attribute> for Attributes
impl BitOr<Attribute> for Attributes
sourceimpl BitOr<Attributes> for Attributes
impl BitOr<Attributes> for Attributes
type Output = Attributes
type Output = Attributes
The resulting type after applying the |
operator.
sourceimpl BitXor<Attribute> for Attributes
impl BitXor<Attribute> for Attributes
sourceimpl BitXor<Attributes> for Attributes
impl BitXor<Attributes> for Attributes
type Output = Attributes
type Output = Attributes
The resulting type after applying the ^
operator.
sourceimpl Clone for Attributes
impl Clone for Attributes
sourcefn clone(&self) -> Attributes
fn clone(&self) -> Attributes
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Attributes
impl Debug for Attributes
sourceimpl Default for Attributes
impl Default for Attributes
sourcefn default() -> Attributes
fn default() -> Attributes
Returns the “default value” for a type. Read more
sourceimpl From<&[Attribute]> for Attributes
impl From<&[Attribute]> for Attributes
sourceimpl From<Attribute> for Attributes
impl From<Attribute> for Attributes
sourceimpl PartialEq<Attributes> for Attributes
impl PartialEq<Attributes> for Attributes
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &Attributes) -> bool
fn ne(&self, other: &Attributes) -> bool
This method tests for !=
.
impl Copy for Attributes
impl Eq for Attributes
impl StructuralEq for Attributes
impl StructuralPartialEq for Attributes
Auto Trait Implementations
impl RefUnwindSafe for Attributes
impl Send for Attributes
impl Sync for Attributes
impl Unpin for Attributes
impl UnwindSafe for Attributes
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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