#[non_exhaustive]pub struct ExchangeErrorDetails {
pub code: String,
pub message: String,
pub data: Option<Value>,
}Expand description
Details for exchange-specific errors.
Extracted to a separate struct and boxed to keep Error enum size small.
Note: #[non_exhaustive] allows adding fields in future versions without breaking changes.
§Example
use ccxt_core::error::ExchangeErrorDetails;
let details = ExchangeErrorDetails::new("400", "Bad Request");
assert_eq!(details.code, "400");Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.code: StringError code as String to support all exchange formats (numeric, alphanumeric).
message: StringDescriptive message from the exchange.
data: Option<Value>Optional raw response data for debugging.
Implementations§
Trait Implementations§
Source§impl Debug for ExchangeErrorDetails
impl Debug for ExchangeErrorDetails
Auto Trait Implementations§
impl Freeze for ExchangeErrorDetails
impl RefUnwindSafe for ExchangeErrorDetails
impl Send for ExchangeErrorDetails
impl Sync for ExchangeErrorDetails
impl Unpin for ExchangeErrorDetails
impl UnwindSafe for ExchangeErrorDetails
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.