#[non_exhaustive]pub enum ColorChannel {
Red,
Green,
Blue,
Alpha,
}Available on crate feature
v4_22 only.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 · 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 ColorChannel
impl Debug for ColorChannel
Source§impl From<ColorChannel> for Value
impl From<ColorChannel> for Value
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
impl<'a> FromValue<'a> for ColorChannel
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
impl HasParamSpec for ColorChannel
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 · 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§impl PartialOrd for ColorChannel
impl PartialOrd for ColorChannel
Source§impl StaticType for ColorChannel
impl StaticType for ColorChannel
Source§fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self.Source§impl ToValue for ColorChannel
impl ToValue for ColorChannel
Source§impl ValueType for ColorChannel
impl ValueType for ColorChannel
Source§type Type = ColorChannel
type Type = ColorChannel
Type to get the
Type from. Read moreimpl Copy for ColorChannel
impl Eq for ColorChannel
impl StructuralPartialEq for ColorChannel
Auto Trait Implementations§
impl Freeze for ColorChannel
impl RefUnwindSafe for ColorChannel
impl Send for ColorChannel
impl Sync for ColorChannel
impl Unpin 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,
Source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
Source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
Source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
Source§fn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
Source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
Source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a
SendValue clone of self.