Trait exr::block::samples::IntoNativeSample[][src]

pub trait IntoNativeSample: Copy + Default + Sync + 'static {
    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

fn to_f16(&self) -> f16[src]

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

fn to_f32(&self) -> f32[src]

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

fn to_u32(&self) -> u32[src]

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

Implementations on Foreign Types

impl IntoNativeSample for f32[src]

fn to_f16(&self) -> f16[src]

fn to_f32(&self) -> f32[src]

fn to_u32(&self) -> u32[src]

impl IntoNativeSample for u32[src]

fn to_f16(&self) -> f16[src]

fn to_f32(&self) -> f32[src]

fn to_u32(&self) -> u32[src]

Implementors

impl IntoNativeSample for Sample[src]

fn to_f16(&self) -> f16[src]

fn to_f32(&self) -> f32[src]

fn to_u32(&self) -> u32[src]

impl IntoNativeSample for f16[src]

fn to_f16(&self) -> f16[src]

fn to_f32(&self) -> f32[src]

fn to_u32(&self) -> u32[src]