Trait Sample

Source
pub trait Sample {
    // Required method
    fn format(channels: u16) -> Result<ALenum, Error>;
}
Expand description

A trait for defining a conversion between a type and an OpenAL format.

Required Methods§

Source

fn format(channels: u16) -> Result<ALenum, Error>

Returns the OpenAL format based on the number of channels.

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§

Source§

impl Sample for i16

Source§

fn format(channels: u16) -> Result<ALenum, Error>

Source§

impl Sample for u8

Source§

fn format(channels: u16) -> Result<ALenum, Error>

Implementors§