pub struct Attributes(/* private fields */);Expand description
Attributes such as bold, italic, etc.
Supports common bitwise operations.
Represented as a single byte bitfield.
Implementations§
Source§impl Attributes
impl Attributes
Sourcepub const UNDERLINED: Self
pub const UNDERLINED: Self
The underlined attribute.
Sourcepub const STRIKETHROUGH: Self
pub const STRIKETHROUGH: Self
The strikethrough attribute.
Sourcepub const fn contains(self, other: Self) -> bool
pub const fn contains(self, other: Self) -> bool
Returns true if self contains all the attributes of other.
Sourcepub const fn or(self, other: Self) -> Self
pub const fn or(self, other: Self) -> Self
Returns a new set which is the union of self and other.
Trait Implementations§
Source§impl BitAnd for Attributes
impl BitAnd for Attributes
Source§impl BitAndAssign for Attributes
impl BitAndAssign for Attributes
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moreSource§impl BitOr for Attributes
impl BitOr for Attributes
Source§impl BitOrAssign for Attributes
impl BitOrAssign for Attributes
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreSource§impl Clone for Attributes
impl Clone for Attributes
Source§fn clone(&self) -> Attributes
fn clone(&self) -> Attributes
Returns a duplicate 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<Attributes> for u8
impl From<Attributes> for u8
Source§fn from(value: Attributes) -> Self
fn from(value: Attributes) -> Self
Converts to this type from the input type.
Source§impl Hash for Attributes
impl Hash for Attributes
Source§impl Not for Attributes
impl Not for Attributes
Source§impl Ord for Attributes
impl Ord for Attributes
Source§fn cmp(&self, other: &Attributes) -> Ordering
fn cmp(&self, other: &Attributes) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Attributes
impl PartialEq for Attributes
Source§impl PartialOrd for Attributes
impl PartialOrd 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