Trait exr::block::samples::IntoNativeSample

source ·
pub trait IntoNativeSample:
    Copy
    + Default
    + Sync
    + 'static {
    // Required methods
    fn to_f16(&self) -> f16;
    fn to_f32(&self) -> f32;
    fn to_u32(&self) -> u32;
}
Expand description

Convert any type into one of the supported sample types. Should be compiled to a no-op where the file contains the predicted sample type

Required Methods§

source

fn to_f16(&self) -> f16

Convert this sample to an f16, trying to represent the same numerical value.

source

fn to_f32(&self) -> f32

Convert this sample to an f32, trying to represent the same numerical value.

source

fn to_u32(&self) -> u32

Convert this sample to an u16, trying to represent the same numerical value.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl IntoNativeSample for f32

source§

fn to_f16(&self) -> f16

source§

fn to_f32(&self) -> f32

source§

fn to_u32(&self) -> u32

source§

impl IntoNativeSample for u32

source§

fn to_f16(&self) -> f16

source§

fn to_f32(&self) -> f32

source§

fn to_u32(&self) -> u32

Implementors§