pub trait LastFmApiClient: Clone {
// Required method
fn api_get_recent_tracks_page_in_range<'life0, 'async_trait>(
&'life0 self,
page: u32,
from: Option<u64>,
to: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<TrackPage>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn api_get_recent_tracks_page<'life0, 'async_trait>(
&'life0 self,
page: u32,
) -> Pin<Box<dyn Future<Output = Result<TrackPage>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Required Methods§
Sourcefn api_get_recent_tracks_page_in_range<'life0, 'async_trait>(
&'life0 self,
page: u32,
from: Option<u64>,
to: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<TrackPage>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn api_get_recent_tracks_page_in_range<'life0, 'async_trait>(
&'life0 self,
page: u32,
from: Option<u64>,
to: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<TrackPage>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch a single page of the user’s recent tracks restricted to a unix-timestamp window.
from and to are passed through to the user.getRecentTracks API endpoint’s
optional from/to query parameters. Observed live (see the
api_recent_tracks_in_range VCR test): from is inclusive and to is
exclusive — a native half-open [from, to) window, despite the API docs’
“strictly after”/“strictly before” wording. Callers that must be robust to a
server-side behavior change can widen from by one second and dedupe by
timestamp.
Provided Methods§
Sourcefn api_get_recent_tracks_page<'life0, 'async_trait>(
&'life0 self,
page: u32,
) -> Pin<Box<dyn Future<Output = Result<TrackPage>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn api_get_recent_tracks_page<'life0, 'async_trait>(
&'life0 self,
page: u32,
) -> Pin<Box<dyn Future<Output = Result<TrackPage>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch a single page of the user’s recent tracks via the JSON API.
Equivalent to api_get_recent_tracks_page_in_range
with no time window.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".