Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ use std::collections::HashMap;
use std::fmt;
use thiserror::Error;

#[derive(Serialize, Deserialize, Debug, Error)]
pub struct ExmoContentError {
pub code: i16,
pub msg: String,

#[serde(flatten)]
extra: HashMap<String, Value>,
}

impl fmt::Display for ExmoContentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "error code: {} msg: {}", self.code, self.msg)
}
}

#[derive(Serialize, Deserialize, Debug, Error)]
pub struct BinanceContentError {
pub code: i16,
Expand Down Expand Up @@ -50,6 +65,8 @@ pub enum OpenLimitsError {
#[error(transparent)]
CoinbaseError(#[from] CoinbaseContentError),
#[error(transparent)]
ExmoError(#[from] ExmoContentError),
#[error(transparent)]
NashProtocolError(#[from] nash_protocol::errors::ProtocolError),
#[error(transparent)]
MissingImplementation(#[from] MissingImplementationContent),
Expand Down
4 changes: 4 additions & 0 deletions src/exmo/client/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#[derive(Clone)]
pub struct BaseClient {
pub transport: super::transport::Transport,
}
2 changes: 2 additions & 0 deletions src/exmo/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pub mod model;
mod transport;
Loading