Skip to main content

Sample

Trait Sample 

Source
pub trait Sample:
    Copy
    + Send
    + Sync
    + 'static {
    // Required methods
    fn to_f32(self) -> f32;
    fn from_mean(v: f32) -> Self;
}
Expand description

Sample types the opcodes run on: f32 for every opcode, u16 (stored integer values) for the lists apply_u16 accepts.

Required Methods§

Source

fn to_f32(self) -> f32

Source

fn from_mean(v: f32) -> Self

A repaired value (mean of neighbours) as stored.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Sample for f32

Source§

impl Sample for u16

Source§

fn from_mean(v: f32) -> u16

Rounded as stored values are after an f32 pass.

Source§

fn to_f32(self) -> f32

Implementors§