pub struct SearchAlbumsIterator<C: LastFmEditClient> { /* private fields */ }Expand description
Iterator for searching albums in the user’s library.
This iterator provides paginated access to albums that match a search query in the authenticated user’s Last.fm library, using Last.fm’s built-in search functionality.
§Examples
Implementations§
Source§impl<C: LastFmEditClient> SearchAlbumsIterator<C>
impl<C: LastFmEditClient> SearchAlbumsIterator<C>
Sourcepub fn new(client: C, query: String) -> Self
pub fn new(client: C, query: String) -> Self
Create a new search albums iterator.
This is typically called via LastFmEditClient::search_albums.
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 albums 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<AlbumPage>>
pub async fn next_page(&mut self) -> Result<Option<AlbumPage>>
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.