pub struct AlbumTracksIterator { /* private fields */ }Expand description
Iterator for browsing tracks in a specific album from a user’s library.
This iterator provides access to all tracks in a specific album by an artist in the authenticated user’s Last.fm library. Unlike paginated iterators, this loads tracks once and iterates through them.
§Examples
let mut client = LastFmEditClientImpl::new(Box::new(http_client::native::NativeClient::new()));
// client.login(...).await?;
let mut tracks = client.album_tracks("The Dark Side of the Moon", "Pink Floyd");
// Get all tracks in the album
while let Some(track) = tracks.next().await? {
println!("{} - {}", track.name, track.artist);
}Implementations§
Source§impl AlbumTracksIterator
impl AlbumTracksIterator
Sourcepub fn new(
client: LastFmEditClientImpl,
album_name: String,
artist_name: String,
) -> Self
pub fn new( client: LastFmEditClientImpl, album_name: String, artist_name: String, ) -> Self
Create a new album tracks iterator.
This is typically called via LastFmEditClient::album_tracks.
Trait Implementations§
Source§impl AsyncPaginatedIterator<Track> for AlbumTracksIterator
impl AsyncPaginatedIterator<Track> for AlbumTracksIterator
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 Freeze for AlbumTracksIterator
impl !RefUnwindSafe for AlbumTracksIterator
impl Send for AlbumTracksIterator
impl Sync for AlbumTracksIterator
impl Unpin for AlbumTracksIterator
impl !UnwindSafe for AlbumTracksIterator
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