pub struct SearchArtistsIterator<C: LastFmEditClient> { /* private fields */ }Expand description
Iterator for searching artists in the user’s library.
This iterator provides paginated access to artists that match a search query in the authenticated user’s Last.fm library, using Last.fm’s built-in search functionality.
Implementations§
Source§impl<C: LastFmEditClient> SearchArtistsIterator<C>
impl<C: LastFmEditClient> SearchArtistsIterator<C>
Sourcepub fn new(client: C, query: String) -> Self
pub fn new(client: C, query: String) -> Self
Create a new search artists iterator.
This is typically called via LastFmEditClient::search_artists.
Sourcepub fn with_starting_page(client: C, query: String, starting_page: u32) -> Self
pub fn with_starting_page(client: C, query: String, starting_page: u32) -> Self
Create a new search artists iterator starting from a specific page.
This is useful for implementing offset functionality efficiently by starting at the appropriate page rather than iterating through all previous pages.
Sourcepub async fn next_page(&mut self) -> Result<Option<ArtistPage>>
pub async fn next_page(&mut self) -> Result<Option<ArtistPage>>
Fetch the next page of search results.
This method handles pagination automatically and includes rate limiting to be respectful to Last.fm’s servers.
Sourcepub fn total_pages(&self) -> Option<u32>
pub fn total_pages(&self) -> Option<u32>
Get the total number of pages, if known.
Returns None until at least one page has been fetched.