pub struct TopAlbumsRequestBuilder { /* private fields */ }Expand description
Builder for top albums requests
Implementations§
Source§impl TopAlbumsRequestBuilder
impl TopAlbumsRequestBuilder
Sourcepub fn on_progress(
self,
callback: impl Fn(u32, u32) + Send + Sync + 'static,
) -> Self
pub fn on_progress( self, callback: impl Fn(u32, u32) + Send + Sync + 'static, ) -> Self
Register a progress callback invoked with (fetched, total) after each batch.
Sourcepub const fn period(self, period: Period) -> Self
pub const fn period(self, period: Period) -> Self
Set the time period for top albums
§Arguments
period- The time range to calculate top albums over. UsePeriod::Overallfor all-time,Period::Weekfor last 7 days,Period::Monthfor last 30 days, etc. If not set, defaults to the Last.fm API’s default behavior (typically overall).
Trait Implementations§
Source§impl Debug for TopAlbumsRequestBuilder
impl Debug for TopAlbumsRequestBuilder
Source§impl FetchAndSave for TopAlbumsRequestBuilder
impl FetchAndSave for TopAlbumsRequestBuilder
Source§fn resource_label() -> &'static str
fn resource_label() -> &'static str
A human-readable label used in log messages (e.g.
"top tracks").Source§fn latest_timestamp(_items: &[Self::Item]) -> Option<u32>
fn latest_timestamp(_items: &[Self::Item]) -> Option<u32>
Return the most recent timestamp from the given items, used to write a sidecar file
after saving. Return
None (the default) if the item type has no timestamp.Source§async fn fetch_and_save(
self,
format: FileFormat,
filename_prefix: &str,
) -> Result<String>
async fn fetch_and_save( self, format: FileFormat, filename_prefix: &str, ) -> Result<String>
Fetch items and save them to a file. Read more
Auto Trait Implementations§
impl Freeze for TopAlbumsRequestBuilder
impl !RefUnwindSafe for TopAlbumsRequestBuilder
impl Send for TopAlbumsRequestBuilder
impl Sync for TopAlbumsRequestBuilder
impl Unpin for TopAlbumsRequestBuilder
impl UnsafeUnpin for TopAlbumsRequestBuilder
impl !UnwindSafe for TopAlbumsRequestBuilder
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