pub struct ExtendedColors(/* private fields */);
Expand description
Implementations§
Source§impl ExtendedColors
impl ExtendedColors
Sourcepub const PALEVIOLETRED: Self
pub const PALEVIOLETRED: Self
4292789163
Sourcepub const MEDIUMVIOLETRED: Self
pub const MEDIUMVIOLETRED: Self
4291237253
Sourcepub const DARKMAGENTA: Self
pub const DARKMAGENTA: Self
4287299723
Sourcepub const MEDIUMORCHID: Self
pub const MEDIUMORCHID: Self
4290414451
Sourcepub const DARKVIOLET: Self
pub const DARKVIOLET: Self
4287889619
Sourcepub const DARKORCHID: Self
pub const DARKORCHID: Self
4288230092
Sourcepub const BLUEVIOLET: Self
pub const BLUEVIOLET: Self
4287245282
Sourcepub const MEDIUMPURPLE: Self
pub const MEDIUMPURPLE: Self
4289454203
Sourcepub const MEDIUMSLATEBLUE: Self
pub const MEDIUMSLATEBLUE: Self
4288269460
Sourcepub const MEDIUMBLUE: Self
pub const MEDIUMBLUE: Self
4289379277
Sourcepub const MIDNIGHTBLUE: Self
pub const MIDNIGHTBLUE: Self
4281368880
Sourcepub const DARKSLATEBLUE: Self
pub const DARKSLATEBLUE: Self
4284048699
Sourcepub const CORNFLOWERBLUE: Self
pub const CORNFLOWERBLUE: Self
4284782061
Sourcepub const LIGHTSTEELBLUE: Self
pub const LIGHTSTEELBLUE: Self
4289775366
Sourcepub const GHOSTWHITE: Self
pub const GHOSTWHITE: Self
4294638335
Sourcepub const DODGERBLUE: Self
pub const DODGERBLUE: Self
4280193279
Sourcepub const DEEPSKYBLUE: Self
pub const DEEPSKYBLUE: Self
4278255615
Sourcepub const LIGHTSLATEGRAY: Self
pub const LIGHTSLATEGRAY: Self
4286023833
Sourcepub const LIGHTSKYBLUE: Self
pub const LIGHTSKYBLUE: Self
4289339194
Sourcepub const DARKTURQUOISE: Self
pub const DARKTURQUOISE: Self
4289470265
Sourcepub const MEDIUMTURQUOISE: Self
pub const MEDIUMTURQUOISE: Self
4289789324
Sourcepub const PALETURQUOISE: Self
pub const PALETURQUOISE: Self
4289520374
Sourcepub const LIGHTSEAGREEN: Self
pub const LIGHTSEAGREEN: Self
4280332970
Sourcepub const POWDERBLUE: Self
pub const POWDERBLUE: Self
4289774812
Sourcepub const DARKSLATEGRAY: Self
pub const DARKSLATEGRAY: Self
4281522975
Sourcepub const AQUAMARINE: Self
pub const AQUAMARINE: Self
4289379196
Sourcepub const MEDIUMSPRINGGREEN: Self
pub const MEDIUMSPRINGGREEN: Self
4278258842
Sourcepub const MEDIUMAQUAMARINE: Self
pub const MEDIUMAQUAMARINE: Self
4288723946
Sourcepub const SPRINGGREEN: Self
pub const SPRINGGREEN: Self
4286563067
Sourcepub const MEDIUMSEAGREEN: Self
pub const MEDIUMSEAGREEN: Self
4285864305
Sourcepub const FORESTGREEN: Self
pub const FORESTGREEN: Self
4286526978
Sourcepub const DARKSEAGREEN: Self
pub const DARKSEAGREEN: Self
4292029967
Sourcepub const LIGHTGREEN: Self
pub const LIGHTGREEN: Self
4292148896
Sourcepub const CHARTREUSE: Self
pub const CHARTREUSE: Self
4289370336
Sourcepub const DARKOLIVEGREEN: Self
pub const DARKOLIVEGREEN: Self
4283676211
Sourcepub const YELLOWGREEN: Self
pub const YELLOWGREEN: Self
4292272306
Sourcepub const GREENYELLOW: Self
pub const GREENYELLOW: Self
4293960297
Sourcepub const LIGHTGOLDENRODYELLOW: Self
pub const LIGHTGOLDENRODYELLOW: Self
4294637750
Sourcepub const LIGHTYELLOW: Self
pub const LIGHTYELLOW: Self
4294967216
Sourcepub const PALEGOLDENROD: Self
pub const PALEGOLDENROD: Self
4293467754
Sourcepub const LEMONCHIFFON: Self
pub const LEMONCHIFFON: Self
4294965453
Sourcepub const PAPAYAWHIP: Self
pub const PAPAYAWHIP: Self
4294955917
Sourcepub const DARKGOLDENROD: Self
pub const DARKGOLDENROD: Self
4286903435
Sourcepub const ANTIQUEWHITE: Self
pub const ANTIQUEWHITE: Self
4294634455
Sourcepub const NAVAJOWHITE: Self
pub const NAVAJOWHITE: Self
4294956353
Sourcepub const DARKORANGE: Self
pub const DARKORANGE: Self
4294940672
Sourcepub const SADDLEBROWN: Self
pub const SADDLEBROWN: Self
4287317267
Sourcepub const SANDYBROWN: Self
pub const SANDYBROWN: Self
4294096452
Sourcepub const BLANCHEDALMOND: Self
pub const BLANCHEDALMOND: Self
4294962125
Sourcepub const LAVENDERBLUSH: Self
pub const LAVENDERBLUSH: Self
4294964715
Sourcepub const FLORALWHITE: Self
pub const FLORALWHITE: Self
4294966496
Sourcepub const LIGHTSALMON: Self
pub const LIGHTSALMON: Self
4294942842
Sourcepub const DARKSALMON: Self
pub const DARKSALMON: Self
4293997764
Sourcepub const LIGHTCORAL: Self
pub const LIGHTCORAL: Self
4293959497
Sourcepub const WHITESMOKE: Self
pub const WHITESMOKE: Self
4294506751
Source§impl ExtendedColors
impl ExtendedColors
Sourcepub const fn bits(&self) -> u32
pub const fn bits(&self) -> u32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u32) -> Option<Self>
pub const fn from_bits(bits: u32) -> Option<Self>
Convert from a bits value.
This method will return None
if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u32) -> Self
pub const fn from_bits_truncate(bits: u32) -> Self
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u32) -> Self
pub const fn from_bits_retain(bits: u32) -> Self
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
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.
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn remove(&mut self, other: Self)
pub fn remove(&mut self, other: Self)
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.
Sourcepub fn toggle(&mut self, other: Self)
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Call insert
when value
is true
or remove
when value
is false
.
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
The bitwise and (&
) of the bits in two flags values.
Sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
The bitwise or (|
) of the bits in two flags values.
Sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
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.
Sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
The bitwise negation (!
) of the bits in a flags value, truncating the result.
Source§impl ExtendedColors
impl ExtendedColors
Sourcepub const fn iter(&self) -> Iter<ExtendedColors>
pub const fn iter(&self) -> Iter<ExtendedColors>
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.
Sourcepub const fn iter_names(&self) -> IterNames<ExtendedColors>
pub const fn iter_names(&self) -> IterNames<ExtendedColors>
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§
Source§impl Binary for ExtendedColors
impl Binary for ExtendedColors
Source§impl BitAnd for ExtendedColors
impl BitAnd for ExtendedColors
Source§impl BitAndAssign for ExtendedColors
impl BitAndAssign for ExtendedColors
Source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
The bitwise and (&
) of the bits in two flags values.
Source§impl BitOr for ExtendedColors
impl BitOr for ExtendedColors
Source§fn bitor(self, other: ExtendedColors) -> Self
fn bitor(self, other: ExtendedColors) -> Self
The bitwise or (|
) of the bits in two flags values.
Source§type Output = ExtendedColors
type Output = ExtendedColors
|
operator.Source§impl BitOrAssign for ExtendedColors
impl BitOrAssign for ExtendedColors
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
The bitwise or (|
) of the bits in two flags values.
Source§impl BitXor for ExtendedColors
impl BitXor for ExtendedColors
Source§impl BitXorAssign for ExtendedColors
impl BitXorAssign for ExtendedColors
Source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
Source§impl Clone for ExtendedColors
impl Clone for ExtendedColors
Source§fn clone(&self) -> ExtendedColors
fn clone(&self) -> ExtendedColors
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ExtendedColors
impl Debug for ExtendedColors
Source§impl Default for ExtendedColors
impl Default for ExtendedColors
Source§impl<'de> Deserialize<'de> for ExtendedColors
impl<'de> Deserialize<'de> for ExtendedColors
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ExtendedColors
impl Display for ExtendedColors
Source§impl Extend<ExtendedColors> for ExtendedColors
impl Extend<ExtendedColors> for ExtendedColors
Source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
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
)Source§impl Flags for ExtendedColors
impl Flags for ExtendedColors
Source§const FLAGS: &'static [Flag<ExtendedColors>]
const FLAGS: &'static [Flag<ExtendedColors>]
Source§fn from_bits_retain(bits: u32) -> ExtendedColors
fn from_bits_retain(bits: u32) -> ExtendedColors
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true
if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
Source§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.Source§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!
). Read moreSource§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.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&
) of the bits in two flags values.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!
). Read moreSource§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^
) of the bits in two flags values.Source§fn complement(self) -> Self
fn complement(self) -> Self
!
) of the bits in a flags value, truncating the result.Source§impl FromIterator<ExtendedColors> for ExtendedColors
impl FromIterator<ExtendedColors> for ExtendedColors
Source§fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
The bitwise or (|
) of the bits in each flags value.
Source§impl FromStr for ExtendedColors
impl FromStr for ExtendedColors
Source§impl Hash for ExtendedColors
impl Hash for ExtendedColors
Source§impl IntoIterator for ExtendedColors
impl IntoIterator for ExtendedColors
Source§impl LowerHex for ExtendedColors
impl LowerHex for ExtendedColors
Source§impl Not for ExtendedColors
impl Not for ExtendedColors
Source§impl Octal for ExtendedColors
impl Octal for ExtendedColors
Source§impl PartialEq for ExtendedColors
impl PartialEq for ExtendedColors
Source§impl PublicFlags for ExtendedColors
impl PublicFlags for ExtendedColors
Source§impl Serialize for ExtendedColors
impl Serialize for ExtendedColors
Source§impl Sub for ExtendedColors
impl Sub for ExtendedColors
Source§fn sub(self, other: Self) -> Self
fn sub(self, other: Self) -> Self
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.
Source§type Output = ExtendedColors
type Output = ExtendedColors
-
operator.Source§impl SubAssign for ExtendedColors
impl SubAssign for ExtendedColors
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
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.
Source§impl UpperHex for ExtendedColors
impl UpperHex for ExtendedColors
impl Copy for ExtendedColors
impl Eq for ExtendedColors
impl StructuralPartialEq for ExtendedColors
Auto Trait Implementations§
impl Freeze for ExtendedColors
impl RefUnwindSafe for ExtendedColors
impl Send for ExtendedColors
impl Sync for ExtendedColors
impl Unpin for ExtendedColors
impl UnwindSafe for ExtendedColors
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more