bybit/
error.rs

1use serde_json::error::Error as SerdeError;
2use std::result;
3use thiserror::Error;
4use tungstenite::error::Error as TungsteniteError;
5
6pub type Result<T, E = BybitError> = result::Result<T, E>;
7
8#[derive(Error, Debug)]
9pub enum BybitError {
10    #[error("Serde error: {0}")]
11    SerdeError(#[from] SerdeError),
12
13    #[error("Tungstenite error: {0}")]
14    TungsteniteError(#[from] TungsteniteError),
15}