pub trait Analyze: Sized {
type Item: TrackAnalyzable;
// Provided methods
async fn analyze(self, threshold: usize) -> Result<TrackStats> { ... }
async fn analyze_and_print(self, threshold: usize) -> Result<()> { ... }
}Expand description
Extension trait providing analyze and analyze_and_print for request builders.
A blanket implementation is provided for every builder that implements FetchAndSave
whose item type implements crate::analytics::TrackAnalyzable. Import this trait to
call .analyze(threshold) and .analyze_and_print(threshold) on any qualifying builder.
§Example
ⓘ
use lastfm_client::{LastFmClient, Analyze};
let stats = client.recent_tracks("username")
.analyze(5)
.await?;Required Associated Types§
Sourcetype Item: TrackAnalyzable
type Item: TrackAnalyzable
The item type produced by this builder.
Provided Methods§
Sourceasync fn analyze(self, threshold: usize) -> Result<TrackStats>
async fn analyze(self, threshold: usize) -> Result<TrackStats>
Sourceasync fn analyze_and_print(self, threshold: usize) -> Result<()>
async fn analyze_and_print(self, threshold: usize) -> Result<()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.