pub struct Player { /* private fields */ }
Implementations§
Source§impl Player
impl Player
pub fn new() -> Self
pub fn is_file_loaded(&self) -> bool
pub async fn load_path(&mut self, path: &str) -> Result<(), Error>
pub async fn load_file(&mut self, file: File) -> Result<(), Error>
pub fn is_seekable(&self) -> bool
pub fn seek(&mut self, time_offset: Duration) -> Result<(), Error>
pub fn play(&mut self)
pub fn pause(&mut self)
pub fn stop(&mut self)
pub fn elapsed(&self) -> Result<Duration, Error>
pub fn duration(&self) -> Option<Duration>
pub fn volume(&self) -> f32
pub fn set_volume(&mut self, volume: f32)
Auto Trait Implementations§
impl !Freeze for Player
impl !RefUnwindSafe for Player
impl !Send for Player
impl !Sync for Player
impl Unpin for Player
impl !UnwindSafe for Player
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more