devela::_dep::symphonia::core::audio

Trait RawSample

pub trait RawSample: Sample {
    type RawType: Copy + Default + Sealed;

    // Required method
    fn into_raw_sample(self) -> Self::RawType;
}
Available on crate feature dep_symphonia only.
Expand description

RawSample provides a typed interface for converting a Sample from it’s in-memory data type to actual binary type.

Required Associated Types§

type RawType: Copy + Default + Sealed

The RawType is a primitive data type, or fixed-size byte array, that is the final binary representation of the sample when written out to a byte-buffer.

Required Methods§

fn into_raw_sample(self) -> Self::RawType

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl RawSample for f32

§

impl RawSample for f64

§

impl RawSample for i8

§

impl RawSample for i16

§

impl RawSample for i32

§

impl RawSample for u8

§

impl RawSample for u16

§

impl RawSample for u32

Implementors§

§

impl RawSample for i24

§

type RawType = [u8; 3]

§

impl RawSample for u24

§

type RawType = [u8; 3]