pub struct AlbumPage {
pub albums: Vec<Album>,
pub page_number: u32,
pub has_next_page: bool,
pub total_pages: Option<u32>,
}Expand description
Represents a paginated collection of albums.
This structure is returned by album listing methods and provides information about the current page and pagination state.
§Examples
use lastfm_edit::{Album, AlbumPage};
let page = AlbumPage {
albums: vec![
Album {
name: "Album 1".to_string(),
artist: "Artist".to_string(),
playcount: 25,
timestamp: None,
}
],
page_number: 1,
has_next_page: false,
total_pages: Some(1),
};
println!("Page {} of {:?}, {} albums",
page.page_number,
page.total_pages,
page.albums.len());Fields§
§albums: Vec<Album>The albums on this page
page_number: u32Current page number (1-indexed)
has_next_page: boolWhether there are more pages available
total_pages: Option<u32>Total number of pages, if known
This may be None if the total page count cannot be determined
from the Last.fm response.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AlbumPage
impl<'de> Deserialize<'de> for AlbumPage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AlbumPage
impl StructuralPartialEq for AlbumPage
Auto Trait Implementations§
impl Freeze for AlbumPage
impl RefUnwindSafe for AlbumPage
impl Send for AlbumPage
impl Sync for AlbumPage
impl Unpin for AlbumPage
impl UnwindSafe for AlbumPage
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