pub struct LastFmEditClientImpl { /* private fields */ }Implementations§
Source§impl LastFmEditClientImpl
impl LastFmEditClientImpl
pub fn from_session( client: Box<dyn HttpClient + Send + Sync>, session: LastFmEditSession, ) -> Self
pub fn from_session_with_rate_limit_patterns( client: Box<dyn HttpClient + Send + Sync>, session: LastFmEditSession, rate_limit_patterns: Vec<String>, ) -> Self
pub async fn login_with_credentials( client: Box<dyn HttpClient + Send + Sync>, username: &str, password: &str, ) -> Result<Self>
pub fn from_session_with_client_config( client: Box<dyn HttpClient + Send + Sync>, session: LastFmEditSession, config: ClientConfig, ) -> Self
pub async fn login_with_credentials_and_client_config( client: Box<dyn HttpClient + Send + Sync>, username: &str, password: &str, config: ClientConfig, ) -> Result<Self>
pub fn from_session_with_config( client: Box<dyn HttpClient + Send + Sync>, session: LastFmEditSession, retry_config: RetryConfig, rate_limit_config: RateLimitConfig, ) -> Self
pub async fn login_with_credentials_and_config( client: Box<dyn HttpClient + Send + Sync>, username: &str, password: &str, retry_config: RetryConfig, rate_limit_config: RateLimitConfig, ) -> Result<Self>
pub fn get_session(&self) -> LastFmEditSession
pub fn restore_session(&self, session: LastFmEditSession)
pub fn username(&self) -> String
pub async fn validate_session(&self) -> bool
pub async fn delete_scrobble( &self, artist_name: &str, track_name: &str, timestamp: u64, ) -> Result<bool>
pub fn subscribe(&self) -> ClientEventReceiver
pub fn latest_event(&self) -> Option<ClientEvent>
pub async fn get_recent_scrobbles(&self, page: u32) -> Result<Vec<Track>>
pub async fn get_recent_tracks_page(&self, page: u32) -> Result<TrackPage>
pub async fn find_recent_scrobble_for_track( &self, track_name: &str, artist_name: &str, max_pages: u32, ) -> Result<Option<Track>>
pub async fn edit_scrobble(&self, edit: &ScrobbleEdit) -> Result<EditResponse>
pub async fn edit_scrobble_single( &self, exact_edit: &ExactScrobbleEdit, max_retries: u32, ) -> Result<EditResponse>
pub async fn load_edit_form_values_internal( &self, track_name: &str, artist_name: &str, ) -> Result<Vec<ExactScrobbleEdit>>
pub async fn get_artist_tracks_page( &self, artist: &str, page: u32, ) -> Result<TrackPage>
pub fn extract_tracks_from_document( &self, document: &Html, artist: &str, album: Option<&str>, ) -> Result<Vec<Track>>
pub fn parse_tracks_page( &self, document: &Html, page_number: u32, artist: &str, album: Option<&str>, ) -> Result<TrackPage>
pub fn parse_recent_scrobbles(&self, document: &Html) -> Result<Vec<Track>>
pub async fn get(&self, url: &str) -> Result<Response>
pub async fn get_artist_albums_page( &self, artist: &str, page: u32, ) -> Result<AlbumPage>
pub async fn get_album_tracks_page( &self, album_name: &str, artist_name: &str, page: u32, ) -> Result<TrackPage>
Trait Implementations§
Source§impl Clone for LastFmEditClientImpl
impl Clone for LastFmEditClientImpl
Source§fn clone(&self) -> LastFmEditClientImpl
fn clone(&self) -> LastFmEditClientImpl
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl LastFmEditClient for LastFmEditClientImpl
impl LastFmEditClient for LastFmEditClientImpl
Source§fn get_recent_scrobbles<'life0, 'async_trait>(
&'life0 self,
page: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_recent_scrobbles<'life0, 'async_trait>(
&'life0 self,
page: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch recent scrobbles from the user’s listening history.
Source§fn find_recent_scrobble_for_track<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
track_name: &'life1 str,
artist_name: &'life2 str,
max_pages: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn find_recent_scrobble_for_track<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
track_name: &'life1 str,
artist_name: &'life2 str,
max_pages: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Find the most recent scrobble for a specific track.
Source§fn edit_scrobble<'life0, 'life1, 'async_trait>(
&'life0 self,
edit: &'life1 ScrobbleEdit,
) -> Pin<Box<dyn Future<Output = Result<EditResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn edit_scrobble<'life0, 'life1, 'async_trait>(
&'life0 self,
edit: &'life1 ScrobbleEdit,
) -> Pin<Box<dyn Future<Output = Result<EditResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Edit scrobbles by discovering and updating all matching instances. Read more
Source§fn edit_scrobble_single<'life0, 'life1, 'async_trait>(
&'life0 self,
exact_edit: &'life1 ExactScrobbleEdit,
max_retries: u32,
) -> Pin<Box<dyn Future<Output = Result<EditResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn edit_scrobble_single<'life0, 'life1, 'async_trait>(
&'life0 self,
exact_edit: &'life1 ExactScrobbleEdit,
max_retries: u32,
) -> Pin<Box<dyn Future<Output = Result<EditResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Edit a single scrobble with complete information and retry logic. Read more
Source§fn get_session(&self) -> LastFmEditSession
fn get_session(&self) -> LastFmEditSession
Extract the current session state for persistence. Read more
Source§fn restore_session(&self, session: LastFmEditSession)
fn restore_session(&self, session: LastFmEditSession)
Restore session state from a previously saved session. Read more
Source§fn subscribe(&self) -> ClientEventReceiver
fn subscribe(&self) -> ClientEventReceiver
Subscribe to internal client events. Read more
Source§fn latest_event(&self) -> Option<ClientEvent>
fn latest_event(&self) -> Option<ClientEvent>
Get the latest client event without subscribing to future events. Read more
Source§fn discover_scrobbles(
&self,
edit: ScrobbleEdit,
) -> Box<dyn AsyncDiscoveryIterator<ExactScrobbleEdit>>
fn discover_scrobbles( &self, edit: ScrobbleEdit, ) -> Box<dyn AsyncDiscoveryIterator<ExactScrobbleEdit>>
Create an incremental discovery iterator for scrobble editing. Read more
Source§fn get_artist_tracks_page<'life0, 'life1, 'async_trait>(
&'life0 self,
artist: &'life1 str,
page: u32,
) -> Pin<Box<dyn Future<Output = Result<TrackPage>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_artist_tracks_page<'life0, 'life1, 'async_trait>(
&'life0 self,
artist: &'life1 str,
page: u32,
) -> Pin<Box<dyn Future<Output = Result<TrackPage>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a page of tracks from the user’s library for the specified artist.
Source§fn get_artist_albums_page<'life0, 'life1, 'async_trait>(
&'life0 self,
artist: &'life1 str,
page: u32,
) -> Pin<Box<dyn Future<Output = Result<AlbumPage>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_artist_albums_page<'life0, 'life1, 'async_trait>(
&'life0 self,
artist: &'life1 str,
page: u32,
) -> Pin<Box<dyn Future<Output = Result<AlbumPage>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a page of albums from the user’s library for the specified artist.
Source§fn get_album_tracks_page<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
album_name: &'life1 str,
artist_name: &'life2 str,
page: u32,
) -> Pin<Box<dyn Future<Output = Result<TrackPage>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_album_tracks_page<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
album_name: &'life1 str,
artist_name: &'life2 str,
page: u32,
) -> Pin<Box<dyn Future<Output = Result<TrackPage>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get a page of tracks from a specific album in the user’s library.
Source§fn artist_tracks(&self, artist: &str) -> ArtistTracksIterator
fn artist_tracks(&self, artist: &str) -> ArtistTracksIterator
Create an iterator for browsing an artist’s tracks from the user’s library.
Source§fn artist_albums(&self, artist: &str) -> ArtistAlbumsIterator
fn artist_albums(&self, artist: &str) -> ArtistAlbumsIterator
Create an iterator for browsing an artist’s albums from the user’s library.
Source§fn album_tracks(
&self,
album_name: &str,
artist_name: &str,
) -> AlbumTracksIterator
fn album_tracks( &self, album_name: &str, artist_name: &str, ) -> AlbumTracksIterator
Create an iterator for browsing tracks from a specific album.
Source§fn recent_tracks(&self) -> RecentTracksIterator
fn recent_tracks(&self) -> RecentTracksIterator
Create an iterator for browsing the user’s recent tracks/scrobbles.
Source§fn recent_tracks_from_page(&self, starting_page: u32) -> RecentTracksIterator
fn recent_tracks_from_page(&self, starting_page: u32) -> RecentTracksIterator
Create an iterator for browsing the user’s recent tracks starting from a specific page.
Source§fn validate_session<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn validate_session<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Validate if the current session is still working. Read more
Source§fn delete_scrobble<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
artist_name: &'life1 str,
track_name: &'life2 str,
timestamp: u64,
) -> Pin<Box<dyn Future<Output = Result<bool>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_scrobble<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
artist_name: &'life1 str,
track_name: &'life2 str,
timestamp: u64,
) -> Pin<Box<dyn Future<Output = Result<bool>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Delete a scrobble by its identifying information. Read more
Source§fn 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 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,
Get a page of tracks from the user’s recent listening history.
Source§fn discover_scrobble_edit_variations<'life0, 'life1, 'async_trait>(
&'life0 self,
edit: &'life1 ScrobbleEdit,
) -> Pin<Box<dyn Future<Output = Result<Vec<ExactScrobbleEdit>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn discover_scrobble_edit_variations<'life0, 'life1, 'async_trait>(
&'life0 self,
edit: &'life1 ScrobbleEdit,
) -> Pin<Box<dyn Future<Output = Result<Vec<ExactScrobbleEdit>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Discover all scrobble edit variations based on the provided ScrobbleEdit template. Read more
Source§fn get_album_tracks<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
album_name: &'life1 str,
artist_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_album_tracks<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
album_name: &'life1 str,
artist_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get tracks from a specific album page.
Source§fn find_scrobble_by_timestamp<'life0, 'async_trait>(
&'life0 self,
timestamp: u64,
) -> Pin<Box<dyn Future<Output = Result<Track>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_scrobble_by_timestamp<'life0, 'async_trait>(
&'life0 self,
timestamp: u64,
) -> Pin<Box<dyn Future<Output = Result<Track>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find a scrobble by its timestamp in recent scrobbles.
Source§fn edit_album<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
old_album_name: &'life1 str,
new_album_name: &'life2 str,
artist_name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<EditResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn edit_album<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
old_album_name: &'life1 str,
new_album_name: &'life2 str,
artist_name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<EditResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Edit album metadata by updating scrobbles with new album name.
Source§fn edit_artist<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
old_artist_name: &'life1 str,
new_artist_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<EditResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn edit_artist<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
old_artist_name: &'life1 str,
new_artist_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<EditResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Edit artist metadata by updating scrobbles with new artist name. Read more
Source§fn edit_artist_for_track<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
track_name: &'life1 str,
old_artist_name: &'life2 str,
new_artist_name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<EditResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn edit_artist_for_track<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
track_name: &'life1 str,
old_artist_name: &'life2 str,
new_artist_name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<EditResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Edit artist metadata for a specific track only. Read more
Source§fn edit_artist_for_album<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
album_name: &'life1 str,
old_artist_name: &'life2 str,
new_artist_name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<EditResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn edit_artist_for_album<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
album_name: &'life1 str,
old_artist_name: &'life2 str,
new_artist_name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<EditResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Edit artist metadata for all tracks in a specific album. Read more
Auto Trait Implementations§
impl Freeze for LastFmEditClientImpl
impl !RefUnwindSafe for LastFmEditClientImpl
impl Send for LastFmEditClientImpl
impl Sync for LastFmEditClientImpl
impl Unpin for LastFmEditClientImpl
impl !UnwindSafe for LastFmEditClientImpl
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