pub struct LastFmApiClientImpl { /* private fields */ }Implementations§
Source§impl LastFmApiClientImpl
impl LastFmApiClientImpl
pub fn new( client: Box<dyn HttpClient + Send + Sync>, username: String, api_key: String, ) -> Self
pub fn subscribe(&self) -> ClientEventReceiver
pub fn latest_event(&self) -> Option<ClientEvent>
Sourcepub fn rate_limit_state(&self) -> RateLimitState
pub fn rate_limit_state(&self) -> RateLimitState
Get the current rate-limit state snapshot.
Sourcepub fn watch_rate_limit_state(&self) -> RateLimitStateWatcher
pub fn watch_rate_limit_state(&self) -> RateLimitStateWatcher
Get a watch receiver tracking rate-limit state transitions.
pub fn username(&self) -> &str
pub fn recent_tracks(&self) -> Box<dyn AsyncPaginatedIterator<Track>>
pub fn recent_tracks_from_page( &self, starting_page: u32, ) -> Box<dyn AsyncPaginatedIterator<Track>>
Sourcepub fn recent_tracks_in_range(
&self,
from: Option<u64>,
to: Option<u64>,
) -> Box<dyn AsyncPaginatedIterator<Track>>
pub fn recent_tracks_in_range( &self, from: Option<u64>, to: Option<u64>, ) -> Box<dyn AsyncPaginatedIterator<Track>>
Iterate over recent tracks restricted to a unix-timestamp window.
from and to are forwarded to the user.getRecentTracks endpoint’s optional
query parameters. Observed live (see the api_recent_tracks_in_range VCR test):
from is inclusive and to is exclusive — a native half-open
[from, to) window.
Trait Implementations§
Source§impl Clone for LastFmApiClientImpl
impl Clone for LastFmApiClientImpl
Source§fn clone(&self) -> LastFmApiClientImpl
fn clone(&self) -> LastFmApiClientImpl
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl LastFmApiClient for LastFmApiClientImpl
impl LastFmApiClient for LastFmApiClientImpl
Source§fn api_get_recent_tracks_page_in_range<'life0, 'async_trait>(
&'life0 self,
page: u32,
from: Option<u64>,
to: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<TrackPage>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn api_get_recent_tracks_page_in_range<'life0, 'async_trait>(
&'life0 self,
page: u32,
from: Option<u64>,
to: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<TrackPage>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch a single page of the user’s recent tracks restricted to a unix-timestamp window. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for LastFmApiClientImpl
impl !UnwindSafe for LastFmApiClientImpl
impl Freeze for LastFmApiClientImpl
impl Send for LastFmApiClientImpl
impl Sync for LastFmApiClientImpl
impl Unpin for LastFmApiClientImpl
impl UnsafeUnpin for LastFmApiClientImpl
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