pub enum ApiError {
Show 15 variants
Unbalanced {
asset: String,
debit: i64,
credit: i64,
},
AssetMismatch {
account: String,
account_asset: String,
asset: String,
},
InvalidAmount {
amount: i64,
},
UnknownAsset {
asset: String,
},
UnknownAccount {
account: String,
},
ConstraintViolation {
account: String,
min_balance: i64,
would_be: i64,
},
AlreadyExists {
what: String,
},
InvalidDraft {
field: String,
reason: String,
},
NotFound {
what: String,
},
Transport {
message: String,
},
Unauthorized,
Forbidden {
book: String,
},
Overloaded,
Timeout,
Internal {
message: String,
},
}Variants§
Unbalanced
AssetMismatch
InvalidAmount
UnknownAsset
UnknownAccount
ConstraintViolation
AlreadyExists
InvalidDraft
NotFound
Transport
Client-side transport failure (network error, retry budget exhausted, undecodable response). Never produced by the server.
Forbidden
The token is valid but its scope does not cover this book/operation. For the global asset registry the book field carries “*”.
Overloaded
The per-book write queue is full. Retry with the same idempotency key — overload degrades to “retry later”, never “maybe applied twice”.
Timeout
The request exceeded the server’s processing deadline. Safe to retry with the same idempotency key.
Internal
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ApiError
impl<'de> Deserialize<'de> for ApiError
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ApiError, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ApiError, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ApiError
impl Serialize for ApiError
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ApiError
impl RefUnwindSafe for ApiError
impl Send for ApiError
impl Sync for ApiError
impl Unpin for ApiError
impl UnsafeUnpin for ApiError
impl UnwindSafe for ApiError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more