pub trait MediaSession {
// Required methods
fn command(&mut self, command: MediaCommand);
fn set_volume(&mut self, volume: f64);
fn sample(&mut self, now: Instant) -> MediaState;
fn active(&self) -> bool;
// Provided methods
fn configure(&mut self, _options: &MediaOptions) { ... }
fn poll_interval(&self) -> Duration { ... }
}Required Methods§
fn command(&mut self, command: MediaCommand)
fn set_volume(&mut self, volume: f64)
fn sample(&mut self, now: Instant) -> MediaState
fn active(&self) -> bool
Provided Methods§
fn configure(&mut self, _options: &MediaOptions)
fn poll_interval(&self) -> Duration
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".