lrclib-api-rs 0.3.1

LRCLib API Wrapper.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use strum::EnumIs;
use thiserror::Error;

// Custom error type using thiserror crate
#[derive(Error, Debug, EnumIs)]
#[non_exhaustive]
pub enum ApiError {
    #[error("Url parse error: {0}")]
    UrlError(#[from] url::ParseError),
    #[error("http request error: {0}")]
    HttpRequestError(#[from] http::Error),
    #[error("JSON serialization error: {0}")]
    JsonSerializationError(#[from] serde_json::Error),
}