pub enum ColorChannel {
R,
G,
B,
A,
}
Expand description
Represents possible color channels in a RGBA color.
Variants§
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 Index<ColorChannel> for Color
Indexing implementation for the Color
struct using ColorChannel
as index.
impl Index<ColorChannel> for Color
Indexing implementation for the Color
struct using ColorChannel
as index.
§Examples
use iris_lib::color::{Color, ColorChannel};
let color = Color { r: 1, g: 2, b: 3, a: 4 };
assert_eq!(1, color[ColorChannel::R]);
assert_eq!(2, color[ColorChannel::G]);
assert_eq!(3, color[ColorChannel::B]);
assert_eq!(4, color[ColorChannel::A]);
Source§impl PartialEq for ColorChannel
impl PartialEq for ColorChannel
impl Copy 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