lastfm 0.10.0

An async client to fetch your Last.fm listening history or the track you are currently playing
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! # Errors
//!
//! Errors that can occur when interacting with the LastFM Client.
use crate::error_response::ErrorResponse;
use thiserror::Error;

/// Errors that can occur when interacting with the LastFM Client.
#[derive(Error, Debug)]
pub enum Error {
    #[error("HTTP error: {0}")]
    Http(#[from] reqwest::Error),
    #[error("JSON deserialization error: {0}")]
    Deserialization(#[from] serde_json::Error),
    #[error("Unretryable error from LastFM: {0}")]
    UnretriableLastFm(#[from] ErrorResponse),
    #[error("Too many retries")]
    TooManyRetry(Vec<Error>),
}