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) -> usizeHow many bytes a single sample takes up.
const fn byte_size() -> usizeNumber of bytes this would consume in an exr file.
fn write<W: Write>(&self, write: &mut W) -> UnitResultWithout 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,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for SampleType
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for SampleType
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for SampleType
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for SampleType
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Pointable for SampleType
const ALIGN: usize = _;type Init = T;unsafe fn init(init: <T as Pointable>::Init) -> usizeunsafe fn deref<'a>(ptr: usize) -> &'a Tunsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tunsafe fn drop(ptr: usize)
impl<T> Read<Exclusive, BecauseExclusive> for SampleType
where
T: ?Sized,
impl<T> ToOwned for SampleType
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for SampleType
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for SampleType
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for SampleType
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>