Skip to main content

PlayableStream

Trait PlayableStream 

Source
pub trait PlayableStream: Send {
    // Required method
    fn play(&self);
}
Expand description

A thin wrapper around a CPAL [Stream] that allows it to be started through a trait object, enabling mocking in tests.

Required Methods§

Source

fn play(&self)

Starts playback/capture on the underlying stream.

§Panics

Panics if the underlying CPAL stream returns an error when playing.

Implementations on Foreign Types§

Source§

impl PlayableStream for Stream

Source§

fn play(&self)

Implementors§