pub struct LovedTracksRequestBuilder { /* private fields */ }Expand description
Builder for loved tracks requests
Implementations§
Source§impl LovedTracksRequestBuilder
impl LovedTracksRequestBuilder
Sourcepub async fn fetch(self) -> Result<Vec<LovedTrack>>
pub async fn fetch(self) -> Result<Vec<LovedTrack>>
Fetch the tracks
§Errors
Returns an error if the HTTP request fails or the response cannot be parsed.
Sourcepub async fn fetch_and_save(
self,
format: FileFormat,
filename_prefix: &str,
) -> Result<String>
pub async fn fetch_and_save( self, format: FileFormat, filename_prefix: &str, ) -> Result<String>
Fetch tracks and save them to a file
§Arguments
format- The file format to save the tracks infilename_prefix- Prefix for the generated filename
§Errors
Returns an error if the HTTP request fails, response cannot be parsed, or file cannot be saved.
§Returns
Result<String>- The filename of the saved file
Sourcepub async fn analyze(self, threshold: usize) -> Result<TrackStats>
pub async fn analyze(self, threshold: usize) -> Result<TrackStats>
Auto Trait Implementations§
impl Freeze for LovedTracksRequestBuilder
impl !RefUnwindSafe for LovedTracksRequestBuilder
impl Send for LovedTracksRequestBuilder
impl Sync for LovedTracksRequestBuilder
impl Unpin for LovedTracksRequestBuilder
impl !UnwindSafe for LovedTracksRequestBuilder
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