pub trait Channel: Copy + Sized + PartialOrd + PartialEq {
type NearestFloat: Float + Channel;
const CHANNEL_MAX: Self;
Show 17 methods
// Required methods
fn from<T: Channel>(chan: T) -> Self;
fn to_channel_u8(self) -> u8;
fn to_channel_u16(self) -> u16;
fn to_channel_u32(self) -> u32;
fn to_channel_f16(self) -> f16;
fn to_channel_f32(self) -> f32;
fn to_channel_f64(self) -> f64;
fn to_nearest_precision_float(self) -> Self::NearestFloat;
fn invert_channel(self) -> Self;
fn mix(self, rhs: Self, value: Self) -> Self;
fn zero() -> Self;
// Provided methods
fn to_channel<T: Channel>(self) -> T { ... }
fn clamp(self, lo: Self, hi: Self) -> Self { ... }
fn normalized_mul(self, rhs: Self) -> Self { ... }
fn normalized_div(self, rhs: Self) -> Self { ... }
fn channel_min(self, rhs: Self) -> Self { ... }
fn channel_max(self, rhs: Self) -> Self { ... }
}