pub trait PixelFormat:
Sized
+ Copy
+ Clone {
type ChannelValue: ChannelFormat;
// Required methods
fn channel(&self, i: usize) -> &Self::ChannelValue;
fn channel_mut(&mut self, i: usize) -> &mut Self::ChannelValue;
// Provided methods
fn num_components() -> usize { ... }
fn components() -> ImageComponent { ... }
fn num_bits_depth() -> usize { ... }
fn bit_depth() -> BitDepth { ... }
}Required Associated Types§
Required Methods§
fn channel(&self, i: usize) -> &Self::ChannelValue
fn channel_mut(&mut self, i: usize) -> &mut Self::ChannelValue
Provided Methods§
fn num_components() -> usize
fn components() -> ImageComponent
fn num_bits_depth() -> usize
fn bit_depth() -> BitDepth
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.