Skip to main content

Sample

Trait Sample 

Source
pub trait Sample: Sealed + Copy {
    const FORMAT: SampleFormat;
}
Expand description

A pixel sample type that can be read in bulk.

Sealed: the set is fixed by the format’s sampleFormat values, and adding to it would mean adding to the format.

Required Associated Constants§

Source

const FORMAT: SampleFormat

The sampleFormat this type corresponds to.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Sample for f32

Source§

const FORMAT: SampleFormat = SampleFormat::Float32

Source§

impl Sample for f64

Source§

const FORMAT: SampleFormat = SampleFormat::Float64

Source§

impl Sample for u8

Source§

const FORMAT: SampleFormat = SampleFormat::UInt8

Source§

impl Sample for u16

Source§

const FORMAT: SampleFormat = SampleFormat::UInt16

Source§

impl Sample for u32

Source§

const FORMAT: SampleFormat = SampleFormat::UInt32

Source§

impl Sample for u64

Source§

const FORMAT: SampleFormat = SampleFormat::UInt64

Implementors§