opensky-network 0.2.1

A simple Rust wrapper library around the OpenSky Network API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/// This error type wraps other crate's errors
#[derive(Debug, thiserror::Error)]
pub enum Error {
    #[error("Server request failed: {0}")]
    Reqwest(#[from] reqwest::Error),

    #[error("Server returned HTTP error code: {0}")]
    Http(reqwest::StatusCode),

    #[error("Unable to parse response as string: {0}")]
    InvalidString(#[from] std::string::FromUtf8Error),

    #[error("Unable to parse response as Json: {0}")]
    InvalidJson(#[from] serde_json::error::Error),
}