Enum SampleType

pub enum SampleType

The type of samples in this channel.

Variants

U32

This channel contains 32-bit unsigned int values.

F16

This channel contains 16-bit float values.

F32

This channel contains 32-bit float values.

Implementations

impl SampleType

const fn bytes_per_sample(&self) -> usize

How many bytes a single sample takes up.

const fn byte_size() -> usize

Number of bytes this would consume in an exr file.

fn write<W: Write>(&self, write: &mut W) -> UnitResult

Without validation, write this instance to the byte stream.

fn read<R: Read>(read: &mut R) -> Result<Self>

Read the value without validating.

Trait Implementations

impl Clone for SampleType

fn clone(&self) -> Self

impl Copy for SampleType

impl Debug for SampleType

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for SampleType

impl Hash for SampleType

fn hash<__H: Hasher>(&self, state: &mut __H)

impl PartialEq for SampleType

fn eq(&self, other: &Self) -> bool

impl StructuralPartialEq for SampleType

Auto Trait Implementations

impl Freeze for SampleType

impl RefUnwindSafe for SampleType

impl Send for SampleType

impl Sync for SampleType

impl Unpin for SampleType

impl UnsafeUnpin for SampleType

impl UnwindSafe for SampleType

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for SampleType where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for SampleType where ST: ?Sized, DT: ?Sized,

impl<T> Any for SampleType where T: 'static + ?Sized,

impl<T> Borrow<T> for SampleType where T: ?Sized,

impl<T> BorrowMut<T> for SampleType where T: ?Sized,

impl<T> CloneToUninit for SampleType where T: Clone,

impl<T> From<T> for SampleType

impl<T> Pointable for SampleType

impl<T> Read<Exclusive, BecauseExclusive> for SampleType where T: ?Sized,

impl<T> ToOwned for SampleType where T: Clone,

impl<T, U> Into<U> for SampleType where U: From<T>,

impl<T, U> TryFrom<U> for SampleType where U: Into<T>,

impl<T, U> TryInto<U> for SampleType where U: TryFrom<T>,