pub trait Playable: Send + Sync {
// Required method
fn open<'life0, 'life1, 'async_trait>(
&'life0 self,
track: &'life1 Track,
start_ms: i64,
) -> Pin<Box<dyn Future<Output = Result<Stream, Failure>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn seekable(&self) -> bool { ... }
fn warm<'life0, 'life1, 'async_trait>(
&'life0 self,
_track: &'life1 Track,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
A source that can stream audio.
Required Methods§
Sourcefn open<'life0, 'life1, 'async_trait>(
&'life0 self,
track: &'life1 Track,
start_ms: i64,
) -> Pin<Box<dyn Future<Output = Result<Stream, Failure>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn open<'life0, 'life1, 'async_trait>(
&'life0 self,
track: &'life1 Track,
start_ms: i64,
) -> Pin<Box<dyn Future<Output = Result<Stream, Failure>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Open track, ideally starting at start_ms (see Stream::start_sample).
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".