trident_explorer/
error.rs

1use serde_json::error::Error as SerdeError;
2use solana_client::client_error::ClientError;
3use solana_sdk::instruction::InstructionError;
4use std::fmt::Error as FmtError;
5use thiserror::Error;
6
7pub type Result<T> = std::result::Result<T, ExplorerError>;
8
9#[derive(Debug, Error)]
10pub enum ExplorerError {
11    #[error("{0}")]
12    SolanaClient(#[from] ClientError),
13
14    #[error("{0}")]
15    SerdeJson(#[from] SerdeError),
16
17    #[error("{0}")]
18    Fmt(#[from] FmtError),
19
20    #[error("{0}")]
21    Instruction(#[from] InstructionError),
22
23    #[error("{0}")]
24    Custom(String),
25}