Skip to main content

SampleEncoder

Trait SampleEncoder 

Source
pub trait SampleEncoder<L, T, O>{
    // Required method
    fn encode_inplace(&self, sample: &mut Sample<L, T, O>);

    // Provided method
    fn encode(&self, sample: Sample<L, T, O>) -> Sample<L, T, O> { ... }
}
Expand description

A trait for sample encoders, i.e. transformations over the sample bits.

Required Methods§

Source

fn encode_inplace(&self, sample: &mut Sample<L, T, O>)

Encodes the sample in-place.

Provided Methods§

Source

fn encode(&self, sample: Sample<L, T, O>) -> Sample<L, T, O>

Consumes the sample and return its encoded version.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<L, T, O, R> SampleEncoder<L, T, O> for Permute<R>

Source§

impl<L, T, O> SampleEncoder<L, T, O> for LinearThermometer

Source§

impl<L, T, O> SampleEncoder<L, T, O> for LogThermometer

Source§

impl<L, T, O> SampleEncoder<L, T, O> for Slice