kira::manager::backend

Trait Backend

Source
pub trait Backend: Sized {
    type Settings;
    type Error;

    // Required methods
    fn setup(settings: Self::Settings) -> Result<(Self, u32), Self::Error>;
    fn start(&mut self, renderer: Renderer) -> Result<(), Self::Error>;
}
Expand description

Connects a Renderer to a lower level audio API.

Required Associated Types§

Source

type Settings

Settings for this backend.

Source

type Error

Errors that can occur when using this backend.

Required Methods§

Source

fn setup(settings: Self::Settings) -> Result<(Self, u32), Self::Error>

Starts the backend and returns itself and the initial sample rate.

Source

fn start(&mut self, renderer: Renderer) -> Result<(), Self::Error>

Sends the renderer to the backend to start audio playback.

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.

Implementors§