#[non_exhaustive]pub enum ColorChannel {
Red,
Green,
Blue,
Alpha,
}Expand description
Enumerates the color channels of RGBA values as used in
GdkColor and OpenGL/Vulkan shaders.
Note that this is not the order of pixel values in Cairo
and MemoryFormat can have many different orders.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Red
The red color channel, aka 0
Green
The green color channel, aka 1
Blue
The blue color channel, aka 2
Alpha
The alpha color channel, aka 3
Trait Implementations§
Source§impl Clone for ColorChannel
impl Clone for ColorChannel
Source§fn clone(&self) -> ColorChannel
fn clone(&self) -> ColorChannel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ColorChannel
Source§impl Debug for ColorChannel
impl Debug for ColorChannel
impl Eq for ColorChannel
Source§impl From<ColorChannel> for Value
Available on crate feature v4_22 only.
impl From<ColorChannel> for Value
Available on crate feature
v4_22 only.Source§fn from(v: ColorChannel) -> Self
fn from(v: ColorChannel) -> Self
Converts to this type from the input type.
Source§impl<'a> FromValue<'a> for ColorChannel
Available on crate feature v4_22 only.
impl<'a> FromValue<'a> for ColorChannel
Available on crate feature
v4_22 only.Source§type Checker = GenericValueTypeChecker<ColorChannel>
type Checker = GenericValueTypeChecker<ColorChannel>
Value type checker.
Source§unsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Get the contained value from a
Value. Read moreSource§impl HasParamSpec for ColorChannel
Available on crate feature v4_22 only.
impl HasParamSpec for ColorChannel
Available on crate feature
v4_22 only.type ParamSpec = ParamSpecEnum
Source§type SetValue = ColorChannel
type SetValue = ColorChannel
Preferred value to be used as setter for the associated ParamSpec.
type BuilderFn = fn(&str, ColorChannel) -> ParamSpecEnumBuilder<'_, ColorChannel>
fn param_spec_builder() -> Self::BuilderFn
Source§impl Hash for ColorChannel
impl Hash for ColorChannel
Source§impl Ord for ColorChannel
impl Ord for ColorChannel
Source§fn cmp(&self, other: &ColorChannel) -> Ordering
fn cmp(&self, other: &ColorChannel) -> Ordering
1.21.0 (const: unstable) · 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 ColorChannel
impl PartialEq for ColorChannel
Source§fn eq(&self, other: &ColorChannel) -> bool
fn eq(&self, other: &ColorChannel) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ColorChannel
impl PartialOrd for ColorChannel
Source§impl StaticType for ColorChannel
Available on crate feature v4_22 only.
impl StaticType for ColorChannel
Available on crate feature
v4_22 only.Source§fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self.impl StructuralPartialEq for ColorChannel
Source§impl ToValue for ColorChannel
Available on crate feature v4_22 only.
impl ToValue for ColorChannel
Available on crate feature
v4_22 only.Source§impl ValueType for ColorChannel
Available on crate feature v4_22 only.
impl ValueType for ColorChannel
Available on crate feature
v4_22 only.Source§type Type = ColorChannel
type Type = ColorChannel
Type to get the
Type from. Read moreAuto Trait Implementations§
impl Freeze for ColorChannel
impl RefUnwindSafe for ColorChannel
impl Send for ColorChannel
impl Sync for ColorChannel
impl Unpin for ColorChannel
impl UnsafeUnpin for ColorChannel
impl UnwindSafe for ColorChannel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> IntoClosureReturnValue for Twhere
T: Into<Value>,
impl<T> IntoClosureReturnValue for Twhere
T: Into<Value>,
fn into_closure_return_value(self) -> Option<Value>
§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
§fn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
§impl<T> ToSendValue for T
impl<T> ToSendValue for T
§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a
SendValue clone of self.