1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
//! Data models specific to the lockchain API
pub mod inputs;
pub mod responses;
/// A wrapper model for various API response types
#[derive(Serialize, Deserialize)]
pub enum Response
{
/// Indicate general success of an operation
Success,
/// Indicate a failure of some kind
Failure(responses::OperationFailed),
/// Returns a login token
Token(responses::TokenMessage),
/// Returns general API information
Api(responses::ApiInformation),
/// Returns a list of all vaults
Vaults(responses::VaultList),
}
#[derive(Debug, Serialize, Deserialize, Copy, Clone, Eq, PartialEq)]
pub struct NoneError;
impl Error for NoneError {}
use std::fmt::{Display, Formatter, Result};
impl Display for NoneError {
fn fmt(&self, f: &mut Formatter) -> Result {
write!(f, "<None>")
}
}
|