stakewiz-rs 0.1.0

Unofficial Rust client for the Stakewiz API - Solana validator analytics
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use thiserror::Error;

#[derive(Error, Debug)]
pub enum StakewizError {
    #[error("HTTP request failed: {0}")]
    Request(#[from] reqwest::Error),

    #[error("JSON deserialization failed: {0}")]
    Json(#[from] serde_json::Error),

    #[error("API returned unexpected response: {0}")]
    Api(String),

    #[error("Epoch not found: {0}")]
    EpochNotFound(u64),
}

pub type Result<T> = std::result::Result<T, StakewizError>;