Struct ExtendedColors

Source
pub struct ExtendedColors(/* private fields */);
Expand description

Enum as bit flags

§C++ Info

  • name: ExtendedColors(ctype: hkEnum<ExtendedColors, hkUint32>)

§Why this enum defined as bitflags?

Since Rust does not allow the definition of enum with duplicate discriminant values, they are defined as bitflags.

Implementations§

Source§

impl ExtendedColors

Source

pub const MAROON: Self

4286578688

Source

pub const DARKRED: Self

4287299584

Source

pub const RED: Self

4294901760

Source

pub const LIGHTPINK: Self

4294944449

Source

pub const CRIMSON: Self

4292613180

Source

pub const PALEVIOLETRED: Self

4292789163

Source

pub const HOTPINK: Self

4294927108

Source

pub const DEEPPINK: Self

4294907027

Source

pub const MEDIUMVIOLETRED: Self

4291237253

Source

pub const PURPLE: Self

4286578816

Source

pub const DARKMAGENTA: Self

4287299723

Source

pub const ORCHID: Self

4292243670

Source

pub const THISTLE: Self

4292394968

Source

pub const PLUM: Self

4292714717

Source

pub const VIOLET: Self

4293821166

Source

pub const FUCHSIA: Self

4294902015

Source

pub const MAGENTA: Self

4294902015

Source

pub const MEDIUMORCHID: Self

4290414451

Source

pub const DARKVIOLET: Self

4287889619

Source

pub const DARKORCHID: Self

4288230092

Source

pub const BLUEVIOLET: Self

4287245282

Source

pub const INDIGO: Self

4284875570

Source

pub const MEDIUMPURPLE: Self

4289454203

Source

pub const SLATEBLUE: Self

4287317261

Source

pub const MEDIUMSLATEBLUE: Self

4288269460

Source

pub const DARKBLUE: Self

4287299587

Source

pub const MEDIUMBLUE: Self

4289379277

Source

pub const BLUE: Self

4294901760

Source

pub const NAVY: Self

4284875648

Source

pub const MIDNIGHTBLUE: Self

4281368880

Source

pub const DARKSLATEBLUE: Self

4284048699

Source

pub const ROYALBLUE: Self

4286006955

Source

pub const CORNFLOWERBLUE: Self

4284782061

Source

pub const LIGHTSTEELBLUE: Self

4289775366

Source

pub const ALICEBLUE: Self

4293982463

Source

pub const GHOSTWHITE: Self

4294638335

Source

pub const LAVENDER: Self

4293322490

Source

pub const DODGERBLUE: Self

4280193279

Source

pub const STEELBLUE: Self

4282811060

Source

pub const DEEPSKYBLUE: Self

4278255615

Source

pub const SLATEGRAY: Self

4285835392

Source

pub const LIGHTSLATEGRAY: Self

4286023833

Source

pub const LIGHTSKYBLUE: Self

4289339194

Source

pub const SKYBLUE: Self

4289342075

Source

pub const LIGHTBLUE: Self

4289959174

Source

pub const TEAL: Self

4284829576

Source

pub const DARKCYAN: Self

4287358955

Source

pub const DARKTURQUOISE: Self

4289470265

Source

pub const CYAN: Self

4286582015

Source

pub const MEDIUMTURQUOISE: Self

4289789324

Source

pub const CADETBLUE: Self

4288893830

Source

pub const PALETURQUOISE: Self

4289520374

Source

pub const LIGHTCYAN: Self

4292935679

Source

pub const AZURE: Self

4293984255

Source

pub const LIGHTSEAGREEN: Self

4280332970

Source

pub const TURQUOISE: Self

4283796272

Source

pub const POWDERBLUE: Self

4289774812

Source

pub const DARKSLATEGRAY: Self

4281522975

Source

pub const AQUAMARINE: Self

4289379196

Source

pub const MEDIUMSPRINGGREEN: Self

4278258842

Source

pub const MEDIUMAQUAMARINE: Self

4288723946

Source

pub const SPRINGGREEN: Self

4286563067

Source

pub const MEDIUMSEAGREEN: Self

4285864305

Source

pub const SEAGREEN: Self

4284861671

Source

pub const LIMEGREEN: Self

4288347394

Source

pub const DARKGREEN: Self

4284827999

Source

pub const GREEN: Self

4284829695

Source

pub const LIME: Self

4286563010

Source

pub const FORESTGREEN: Self

4286526978

Source

pub const DARKSEAGREEN: Self

4292029967

Source

pub const LIGHTGREEN: Self

4292148896

Source

pub const PALEGREEN: Self

4292430344

Source

pub const MINTCREAM: Self

4294966780

Source

pub const HONEYDEW: Self

4293987744

Source

pub const CHARTREUSE: Self

4289370336

Source

pub const LAWNGREEN: Self

4289336832

Source

pub const OLIVEDRAB: Self

4286085249

Source

pub const DARKOLIVEGREEN: Self

4283676211

Source

pub const YELLOWGREEN: Self

4292272306

Source

pub const GREENYELLOW: Self

4293960297

Source

pub const BEIGE: Self

4293787924

Source

pub const LINEN: Self

4294635702

Source

pub const LIGHTGOLDENRODYELLOW: Self

4294637750

Source

pub const OLIVE: Self

4286595072

Source

pub const YELLOW: Self

4294967040

Source

pub const LIGHTYELLOW: Self

4294967216

Source

pub const IVORY: Self

4294967280

Source

pub const DARKKHAKI: Self

4290623339

Source

pub const KHAKI: Self

4293988284

Source

pub const PALEGOLDENROD: Self

4293467754

Source

pub const WHEAT: Self

4293720580

Source

pub const GOLD: Self

4294956800

Source

pub const LEMONCHIFFON: Self

4294965453

Source

pub const PAPAYAWHIP: Self

4294955917

Source

pub const DARKGOLDENROD: Self

4286903435

Source

pub const GOLDENROD: Self

4292519200

Source

pub const ANTIQUEWHITE: Self

4294634455

Source

pub const CORNSILK: Self

4294966116

Source

pub const OLDLACE: Self

4294960102

Source

pub const MOCCASIN: Self

4294953679

Source

pub const NAVAJOWHITE: Self

4294956353

Source

pub const ORANGE: Self

4294944000

Source

pub const BISQUE: Self

4294953924

Source

pub const TAN: Self

4292907392

Source

pub const DARKORANGE: Self

4294940672

Source

pub const BURLYWOOD: Self

4292783287

Source

pub const SADDLEBROWN: Self

4287317267

Source

pub const SANDYBROWN: Self

4294096452

Source

pub const BLANCHEDALMOND: Self

4294962125

Source

pub const LAVENDERBLUSH: Self

4294964715

Source

pub const SEASHELL: Self

4294965998

Source

pub const FLORALWHITE: Self

4294966496

Source

pub const SNOW: Self

4294967182

Source

pub const PERU: Self

4286078079

Source

pub const PEACHPUFF: Self

4294956489

Source

pub const CHOCOLATE: Self

4289864222

Source

pub const SIENNA: Self

4288696877

Source

pub const LIGHTSALMON: Self

4294942842

Source

pub const CORAL: Self

4294934352

Source

pub const DARKSALMON: Self

4293997764

Source

pub const MISTYROSE: Self

4294954237

Source

pub const ORANGERED: Self

4294940672

Source

pub const SALMON: Self

4294947974

Source

pub const TOMATO: Self

4294943895

Source

pub const ROSYBROWN: Self

4292080495

Source

pub const PINK: Self

4294961403

Source

pub const INDIANRED: Self

4289864222

Source

pub const LIGHTCORAL: Self

4293959497

Source

pub const BROWN: Self

4289014314

Source

pub const FIREBRICK: Self

4289501062

Source

pub const BLACK: Self

4278190080

Source

pub const DIMGRAY: Self

4285098345

Source

pub const GRAY: Self

4286611584

Source

pub const DARKGRAY: Self

4289309097

Source

pub const SILVER: Self

4289374890

Source

pub const LIGHTGREY: Self

4292072403

Source

pub const GAINSBORO: Self

4292332748

Source

pub const WHITESMOKE: Self

4294506751

Source

pub const WHITE: Self

4294967295

Source

pub const GREY: Self

4287137928

Source

pub const GREY25: Self

4282400896

Source

pub const GREY50: Self

4286611584

Source

pub const GREY75: Self

4290822336

Source§

impl ExtendedColors

Source

pub const fn empty() -> Self

Get a flags value with all bits unset.

Source

pub const fn all() -> Self

Get a flags value with all known bits set.

Source

pub const fn bits(&self) -> u32

Get the underlying bits value.

The returned value is exactly the bits set in this flags value.

Source

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.

Source

pub const fn from_bits_truncate(bits: u32) -> Self

Convert from a bits value, unsetting any unknown bits.

Source

pub const fn from_bits_retain(bits: u32) -> Self

Convert from a bits value exactly.

Source

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.

Source

pub const fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.

Source

pub const fn is_all(&self) -> bool

Whether all known bits in this flags value are set.

Source

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.

Source

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.

Source

pub fn insert(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

Source

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.

Source

pub fn toggle(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

Source

pub fn set(&mut self, other: Self, value: bool)

Call insert when value is true or remove when value is false.

Source

pub const fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

Source

pub const fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.

Source

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.

Source

pub const fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

Source

pub const fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

Source§

impl ExtendedColors

Source

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.

Source

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl BitAnd for ExtendedColors

Source§

fn bitand(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

Source§

type Output = ExtendedColors

The resulting type after applying the & operator.
Source§

impl BitAndAssign for ExtendedColors

Source§

fn bitand_assign(&mut self, other: Self)

The bitwise and (&) of the bits in two flags values.

Source§

impl BitOr for ExtendedColors

Source§

fn bitor(self, other: ExtendedColors) -> Self

The bitwise or (|) of the bits in two flags values.

Source§

type Output = ExtendedColors

The resulting type after applying the | operator.
Source§

impl BitOrAssign for ExtendedColors

Source§

fn bitor_assign(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

Source§

impl BitXor for ExtendedColors

Source§

fn bitxor(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

Source§

type Output = ExtendedColors

The resulting type after applying the ^ operator.
Source§

impl BitXorAssign for ExtendedColors

Source§

fn bitxor_assign(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

Source§

impl Clone for ExtendedColors

Source§

fn clone(&self) -> ExtendedColors

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExtendedColors

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ExtendedColors

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ExtendedColors

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for ExtendedColors

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Extend<ExtendedColors> for ExtendedColors

Source§

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)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl Flags for ExtendedColors

Source§

const FLAGS: &'static [Flag<ExtendedColors>]

The set of defined flags.
Source§

type Bits = u32

The underlying bits type.
Source§

fn bits(&self) -> u32

Get the underlying bits value. Read more
Source§

fn from_bits_retain(bits: u32) -> ExtendedColors

Convert from a bits value exactly.
Source§

fn empty() -> Self

Get a flags value with all bits unset.
Source§

fn all() -> Self

Get a flags value with all known bits set.
Source§

fn contains_unknown_bits(&self) -> bool

This method will return true if any unknown bits are set.
Source§

fn from_bits(bits: Self::Bits) -> Option<Self>

Convert from a bits value. Read more
Source§

fn from_bits_truncate(bits: Self::Bits) -> Self

Convert from a bits value, unsetting any unknown bits.
Source§

fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set. Read more
Source§

fn iter(&self) -> Iter<Self>

Yield a set of contained flags values. Read more
Source§

fn iter_names(&self) -> IterNames<Self>

Yield a set of contained named flags values. Read more
Source§

fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.
Source§

fn is_all(&self) -> bool

Whether all known bits in this flags value are set.
Source§

fn intersects(&self, other: Self) -> bool
where Self: Sized,

Whether any set bits in a source flags value are also set in a target flags value.
Source§

fn contains(&self, other: Self) -> bool
where Self: Sized,

Whether all set bits in a source flags value are also set in a target flags value.
Source§

fn truncate(&mut self)
where Self: Sized,

Remove any unknown bits from the flags.
Source§

fn insert(&mut self, other: Self)
where Self: Sized,

The bitwise or (|) of the bits in two flags values.
Source§

fn remove(&mut self, other: Self)
where Self: Sized,

The intersection of a source flags value with the complement of a target flags value (&!). Read more
Source§

fn toggle(&mut self, other: Self)
where Self: Sized,

The bitwise exclusive-or (^) of the bits in two flags values.
Source§

fn set(&mut self, other: Self, value: bool)
where Self: Sized,

Call Flags::insert when value is true or Flags::remove when value is false.
Source§

fn clear(&mut self)
where Self: Sized,

Unsets all bits in the flags.
Source§

fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.
Source§

fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.
Source§

fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!). Read more
Source§

fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.
Source§

fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§

impl FromIterator<ExtendedColors> for ExtendedColors

Source§

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

Source§

type Err = String

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for ExtendedColors

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl IntoIterator for ExtendedColors

Source§

type Item = ExtendedColors

The type of the elements being iterated over.
Source§

type IntoIter = Iter<ExtendedColors>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl LowerHex for ExtendedColors

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Not for ExtendedColors

Source§

fn not(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

Source§

type Output = ExtendedColors

The resulting type after applying the ! operator.
Source§

impl Octal for ExtendedColors

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ExtendedColors

Source§

fn eq(&self, other: &ExtendedColors) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PublicFlags for ExtendedColors

Source§

type Primitive = u32

The type of the underlying storage.
Source§

type Internal = InternalBitFlags

The type of the internal field on the generated flags type.
Source§

impl Serialize for ExtendedColors

Source§

fn serialize<S>(&self, __serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer.
Source§

impl Sub for ExtendedColors

Source§

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

The resulting type after applying the - operator.
Source§

impl SubAssign for ExtendedColors

Source§

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for ExtendedColors

Source§

impl Eq for ExtendedColors

Source§

impl StructuralPartialEq for ExtendedColors

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> IntoResult<T> for T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,