Struct TextDecorationLine
pub struct TextDecorationLine(/* private fields */);
Implementations§
§impl TextDecorationLine
impl TextDecorationLine
pub const Underline: TextDecorationLine = _
pub const Underline: TextDecorationLine = _
Each line of text is underlined.
pub const Overline: TextDecorationLine = _
pub const Overline: TextDecorationLine = _
Each line of text has a line over it.
pub const Strikethrough: TextDecorationLine = _
pub const Strikethrough: TextDecorationLine = _
Each line of text has a line through the middle.
§impl TextDecorationLine
impl TextDecorationLine
pub const fn empty() -> TextDecorationLine
pub const fn empty() -> TextDecorationLine
Get a flags value with all bits unset.
pub const fn all() -> TextDecorationLine
pub const fn all() -> TextDecorationLine
Get a flags value with all known bits set.
pub const fn bits(&self) -> u8
pub const fn bits(&self) -> u8
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
pub const fn from_bits(bits: u8) -> Option<TextDecorationLine>
pub const fn from_bits(bits: u8) -> Option<TextDecorationLine>
Convert from a bits value.
This method will return None
if any unknown bits are set.
pub const fn from_bits_truncate(bits: u8) -> TextDecorationLine
pub const fn from_bits_truncate(bits: u8) -> TextDecorationLine
Convert from a bits value, unsetting any unknown bits.
pub const fn from_bits_retain(bits: u8) -> TextDecorationLine
pub const fn from_bits_retain(bits: u8) -> TextDecorationLine
Convert from a bits value exactly.
pub fn from_name(name: &str) -> Option<TextDecorationLine>
pub fn from_name(name: &str) -> Option<TextDecorationLine>
Get a flags value with the bits of a flag with the given name set.
This method will return None
if name
is empty or doesn’t
correspond to any named flag.
pub const fn intersects(&self, other: TextDecorationLine) -> bool
pub const fn intersects(&self, other: TextDecorationLine) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
pub const fn contains(&self, other: TextDecorationLine) -> bool
pub const fn contains(&self, other: TextDecorationLine) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
pub fn insert(&mut self, other: TextDecorationLine)
pub fn insert(&mut self, other: TextDecorationLine)
The bitwise or (|
) of the bits in two flags values.
pub fn remove(&mut self, other: TextDecorationLine)
pub fn remove(&mut self, other: TextDecorationLine)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
remove
won’t truncate other
, but the !
operator will.
pub fn toggle(&mut self, other: TextDecorationLine)
pub fn toggle(&mut self, other: TextDecorationLine)
The bitwise exclusive-or (^
) of the bits in two flags values.
pub fn set(&mut self, other: TextDecorationLine, value: bool)
pub fn set(&mut self, other: TextDecorationLine, value: bool)
Call insert
when value
is true
or remove
when value
is false
.
pub const fn intersection(self, other: TextDecorationLine) -> TextDecorationLine
pub const fn intersection(self, other: TextDecorationLine) -> TextDecorationLine
The bitwise and (&
) of the bits in two flags values.
pub const fn union(self, other: TextDecorationLine) -> TextDecorationLine
pub const fn union(self, other: TextDecorationLine) -> TextDecorationLine
The bitwise or (|
) of the bits in two flags values.
pub const fn difference(self, other: TextDecorationLine) -> TextDecorationLine
pub const fn difference(self, other: TextDecorationLine) -> TextDecorationLine
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
pub const fn symmetric_difference(
self,
other: TextDecorationLine,
) -> TextDecorationLine
pub const fn symmetric_difference( self, other: TextDecorationLine, ) -> TextDecorationLine
The bitwise exclusive-or (^
) of the bits in two flags values.
pub const fn complement(self) -> TextDecorationLine
pub const fn complement(self) -> TextDecorationLine
The bitwise negation (!
) of the bits in a flags value, truncating the result.
§impl TextDecorationLine
impl TextDecorationLine
pub const fn iter(&self) -> Iter<TextDecorationLine>
pub const fn iter(&self) -> Iter<TextDecorationLine>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
pub const fn iter_names(&self) -> IterNames<TextDecorationLine>
pub const fn iter_names(&self) -> IterNames<TextDecorationLine>
Yield a set of contained named flags values.
This method is like iter
, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
§impl Binary for TextDecorationLine
impl Binary for TextDecorationLine
§impl BitAnd for TextDecorationLine
impl BitAnd for TextDecorationLine
§fn bitand(self, other: TextDecorationLine) -> TextDecorationLine
fn bitand(self, other: TextDecorationLine) -> TextDecorationLine
The bitwise and (&
) of the bits in two flags values.
§type Output = TextDecorationLine
type Output = TextDecorationLine
&
operator.§impl BitAndAssign for TextDecorationLine
impl BitAndAssign for TextDecorationLine
§fn bitand_assign(&mut self, other: TextDecorationLine)
fn bitand_assign(&mut self, other: TextDecorationLine)
The bitwise and (&
) of the bits in two flags values.
§impl BitOr for TextDecorationLine
impl BitOr for TextDecorationLine
§fn bitor(self, other: TextDecorationLine) -> TextDecorationLine
fn bitor(self, other: TextDecorationLine) -> TextDecorationLine
The bitwise or (|
) of the bits in two flags values.
§type Output = TextDecorationLine
type Output = TextDecorationLine
|
operator.§impl BitOrAssign for TextDecorationLine
impl BitOrAssign for TextDecorationLine
§fn bitor_assign(&mut self, other: TextDecorationLine)
fn bitor_assign(&mut self, other: TextDecorationLine)
The bitwise or (|
) of the bits in two flags values.
§impl BitXor for TextDecorationLine
impl BitXor for TextDecorationLine
§fn bitxor(self, other: TextDecorationLine) -> TextDecorationLine
fn bitxor(self, other: TextDecorationLine) -> TextDecorationLine
The bitwise exclusive-or (^
) of the bits in two flags values.
§type Output = TextDecorationLine
type Output = TextDecorationLine
^
operator.§impl BitXorAssign for TextDecorationLine
impl BitXorAssign for TextDecorationLine
§fn bitxor_assign(&mut self, other: TextDecorationLine)
fn bitxor_assign(&mut self, other: TextDecorationLine)
The bitwise exclusive-or (^
) of the bits in two flags values.
§impl Clone for TextDecorationLine
impl Clone for TextDecorationLine
§fn clone(&self) -> TextDecorationLine
fn clone(&self) -> TextDecorationLine
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Data for TextDecorationLine
impl Data for TextDecorationLine
fn same(&self, other: &TextDecorationLine) -> bool
§impl Debug for TextDecorationLine
impl Debug for TextDecorationLine
§impl Default for TextDecorationLine
impl Default for TextDecorationLine
§fn default() -> TextDecorationLine
fn default() -> TextDecorationLine
§impl Extend<TextDecorationLine> for TextDecorationLine
impl Extend<TextDecorationLine> for TextDecorationLine
§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = TextDecorationLine>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = TextDecorationLine>,
The bitwise or (|
) of the bits in each flags value.
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)§impl Flags for TextDecorationLine
impl Flags for TextDecorationLine
§const FLAGS: &'static [Flag<TextDecorationLine>] = _
const FLAGS: &'static [Flag<TextDecorationLine>] = _
§fn from_bits_retain(bits: u8) -> TextDecorationLine
fn from_bits_retain(bits: u8) -> TextDecorationLine
§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|
) of the bits in two flags values.§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!
). Read more§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^
) of the bits in two flags values.§fn set(&mut self, other: Self, value: bool)where
Self: Sized,
fn set(&mut self, other: Self, value: bool)where
Self: Sized,
Flags::insert
] when value
is true
or [Flags::remove
] when value
is false
.§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&
) of the bits in two flags values.§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!
). Read more§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^
) of the bits in two flags values.§fn complement(self) -> Self
fn complement(self) -> Self
!
) of the bits in a flags value, truncating the result.§impl From<TextDecorationLine> for TextDecoration
impl From<TextDecorationLine> for TextDecoration
§fn from(value: TextDecorationLine) -> TextDecoration
fn from(value: TextDecorationLine) -> TextDecoration
§impl FromIterator<TextDecorationLine> for TextDecorationLine
impl FromIterator<TextDecorationLine> for TextDecorationLine
§fn from_iter<T>(iterator: T) -> TextDecorationLinewhere
T: IntoIterator<Item = TextDecorationLine>,
fn from_iter<T>(iterator: T) -> TextDecorationLinewhere
T: IntoIterator<Item = TextDecorationLine>,
The bitwise or (|
) of the bits in each flags value.
§impl IntoIterator for TextDecorationLine
impl IntoIterator for TextDecorationLine
§type Item = TextDecorationLine
type Item = TextDecorationLine
§type IntoIter = Iter<TextDecorationLine>
type IntoIter = Iter<TextDecorationLine>
§fn into_iter(self) -> <TextDecorationLine as IntoIterator>::IntoIter
fn into_iter(self) -> <TextDecorationLine as IntoIterator>::IntoIter
§impl LowerHex for TextDecorationLine
impl LowerHex for TextDecorationLine
§impl Not for TextDecorationLine
impl Not for TextDecorationLine
§fn not(self) -> TextDecorationLine
fn not(self) -> TextDecorationLine
The bitwise negation (!
) of the bits in a flags value, truncating the result.
§type Output = TextDecorationLine
type Output = TextDecorationLine
!
operator.§impl Octal for TextDecorationLine
impl Octal for TextDecorationLine
§impl Ord for TextDecorationLine
impl Ord for TextDecorationLine
§fn cmp(&self, other: &TextDecorationLine) -> Ordering
fn cmp(&self, other: &TextDecorationLine) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
§impl<'i> Parse<'i> for TextDecorationLine
impl<'i> Parse<'i> for TextDecorationLine
fn parse<'t>( input: &mut Parser<'i, 't>, ) -> Result<TextDecorationLine, ParseError<'i, CustomParseError<'i>>>
§impl PartialEq for TextDecorationLine
impl PartialEq for TextDecorationLine
§impl PartialOrd for TextDecorationLine
impl PartialOrd for TextDecorationLine
source§impl Res<TextDecorationLine> for TextDecorationLine
impl Res<TextDecorationLine> for TextDecorationLine
source§impl ResGet<TextDecorationLine> for TextDecorationLine
impl ResGet<TextDecorationLine> for TextDecorationLine
fn get_ref<'a>( &self, _: &impl DataContext, ) -> Option<LensValue<'_, TextDecorationLine>>
fn get(&self, _: &impl DataContext) -> TextDecorationLine
§impl Sub for TextDecorationLine
impl Sub for TextDecorationLine
§fn sub(self, other: TextDecorationLine) -> TextDecorationLine
fn sub(self, other: TextDecorationLine) -> TextDecorationLine
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
§type Output = TextDecorationLine
type Output = TextDecorationLine
-
operator.§impl SubAssign for TextDecorationLine
impl SubAssign for TextDecorationLine
§fn sub_assign(&mut self, other: TextDecorationLine)
fn sub_assign(&mut self, other: TextDecorationLine)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
§impl UpperHex for TextDecorationLine
impl UpperHex for TextDecorationLine
impl Copy for TextDecorationLine
impl Eq for TextDecorationLine
impl StructuralPartialEq for TextDecorationLine
Auto Trait Implementations§
impl Freeze for TextDecorationLine
impl RefUnwindSafe for TextDecorationLine
impl Send for TextDecorationLine
impl Sync for TextDecorationLine
impl Unpin for TextDecorationLine
impl UnwindSafe for TextDecorationLine
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.