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

pub trait FromNativeSample: Sized + Copy + Default + 'static {
    fn from_f16(value: f16) -> Self;
fn from_f32(value: f32) -> Self;
fn from_u32(value: u32) -> Self; }
Expand description

Create an arbitrary sample type from one of the defined sample types. Should be compiled to a no-op where the file contains the predicted sample type.

Required methods

fn from_f16(value: f16) -> Self[src]

Create this sample from a f16, trying to represent the same numerical value

fn from_f32(value: f32) -> Self[src]

Create this sample from a f32, trying to represent the same numerical value

fn from_u32(value: u32) -> Self[src]

Create this sample from a u32, trying to represent the same numerical value

Implementations on Foreign Types

impl FromNativeSample for f32[src]

fn from_f16(value: f16) -> Self[src]

fn from_f32(value: f32) -> Self[src]

fn from_u32(value: u32) -> Self[src]

impl FromNativeSample for u32[src]

fn from_f16(value: f16) -> Self[src]

fn from_f32(value: f32) -> Self[src]

fn from_u32(value: u32) -> Self[src]

Implementors

impl FromNativeSample for Sample[src]

fn from_f16(value: f16) -> Self[src]

fn from_f32(value: f32) -> Self[src]

fn from_u32(value: u32) -> Self[src]

impl FromNativeSample for f16[src]

fn from_f16(value: f16) -> Self[src]

fn from_f32(value: f32) -> Self[src]

fn from_u32(value: u32) -> Self[src]