pub struct ApiRecentTracksIterator<C: LastFmApiClient> { /* private fields */ }Expand description
Iterator for browsing a user’s recent tracks via the Last.fm JSON API.
This iterator uses the user.getRecentTracks API endpoint which supports
up to 200 items per page and is less aggressively rate-limited than web scraping.
It supports optional timestamp-based filtering identical to RecentTracksIterator.
Implementations§
Source§impl<C: LastFmApiClient> ApiRecentTracksIterator<C>
impl<C: LastFmApiClient> ApiRecentTracksIterator<C>
pub fn new(client: C) -> Self
pub fn with_starting_page(client: C, starting_page: u32) -> Self
pub fn with_stop_timestamp(self, timestamp: u64) -> Self
Trait Implementations§
Source§impl<C: LastFmApiClient> AsyncPaginatedIterator<Track> for ApiRecentTracksIterator<C>
impl<C: LastFmApiClient> AsyncPaginatedIterator<Track> for ApiRecentTracksIterator<C>
Source§fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch the next item from the iterator. Read more
Source§fn current_page(&self) -> u32
fn current_page(&self) -> u32
Get the current page number (0-indexed). Read more
Auto Trait Implementations§
impl<C> Freeze for ApiRecentTracksIterator<C>where
C: Freeze,
impl<C> RefUnwindSafe for ApiRecentTracksIterator<C>where
C: RefUnwindSafe,
impl<C> Send for ApiRecentTracksIterator<C>where
C: Send,
impl<C> Sync for ApiRecentTracksIterator<C>where
C: Sync,
impl<C> Unpin for ApiRecentTracksIterator<C>where
C: Unpin,
impl<C> UnsafeUnpin for ApiRecentTracksIterator<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for ApiRecentTracksIterator<C>where
C: UnwindSafe,
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