pub struct Player {
pub info: Info,
pub finished_tracks: Arc<Mutex<Vec<i32>>>,
pub ts: Arc<Mutex<f64>>,
/* private fields */
}Fields§
§info: Info§finished_tracks: Arc<Mutex<Vec<i32>>>§ts: Arc<Mutex<f64>>Implementations§
Source§impl Player
impl Player
pub fn new(file_path: &String) -> Self
pub fn new_from_file_paths(file_paths: &Vec<Vec<String>>) -> Self
pub fn new_from_path_or_paths( path: Option<&String>, paths: Option<&Vec<Vec<String>>>, ) -> Self
pub fn play_at(&mut self, ts: f64)
pub fn play(&mut self)
pub fn pause(&self)
pub fn resume(&self)
pub fn kill_current(&self)
pub fn stop(&self)
pub fn is_playing(&self) -> bool
pub fn is_paused(&self) -> bool
pub fn get_time(&self) -> f64
pub fn is_finished(&self) -> bool
pub fn sleep_until_end(&self)
pub fn get_duration(&self) -> f64
pub fn seek(&mut self, ts: f64)
pub fn refresh_tracks(&mut self)
pub fn shuffle(&mut self)
pub fn set_volume(&mut self, new_volume: f32)
pub fn get_volume(&self) -> f32
pub fn get_ids(&self) -> Vec<String>
pub fn set_reporting( &mut self, reporting: Arc<Mutex<dyn Fn(Report) + Send>>, reporting_interval: Duration, )
Trait Implementations§
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