pub struct Spotify { /* private fields */ }
Expand description
The Spotify API.
Implementations§
source§impl Spotify
impl Spotify
Implements Spotify
.
sourcepub fn connect() -> Result<Spotify, SpotifyError>
pub fn connect() -> Result<Spotify, SpotifyError>
Connects to the local Spotify client.
sourcepub fn poll<F>(self, f: F) -> JoinHandle<()>
pub fn poll<F>(self, f: F) -> JoinHandle<()>
Moves self
to a new thread and begins polling the
client status. Sends the updated status to the specified
closure, together with information of which fields had changed
since the last update. Returns the JoinHandle
of the new thread.
sourcepub fn status(&self) -> Result<SpotifyStatus, SpotifyError>
pub fn status(&self) -> Result<SpotifyStatus, SpotifyError>
Fetches the current status from the client.
Auto Trait Implementations§
impl RefUnwindSafe for Spotify
impl Send for Spotify
impl Sync for Spotify
impl Unpin for Spotify
impl UnwindSafe for Spotify
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