pub enum SwapQuoteError {
Domain(SwapQuoteErrorCode),
Upstream(ErpcError),
}Expand description
Domain errors produced by quote validation, with upstream errors preserved.
Variants§
Domain(SwapQuoteErrorCode)
A deterministic local quote-domain failure.
Upstream(ErpcError)
An existing transport, timeout, cancellation, or JSON-RPC error.
Implementations§
Source§impl SwapQuoteError
impl SwapQuoteError
Sourcepub const fn code(&self) -> Option<SwapQuoteErrorCode>
pub const fn code(&self) -> Option<SwapQuoteErrorCode>
Returns the domain code, or None when an upstream error was preserved.
Sourcepub const fn upstream(&self) -> Option<&ErpcError>
pub const fn upstream(&self) -> Option<&ErpcError>
Returns the preserved upstream error when the quote failed in transport.
Sourcepub const fn code_string(&self) -> Option<&'static str>
pub const fn code_string(&self) -> Option<&'static str>
Returns the stable code string for a domain error.
Trait Implementations§
Source§impl Debug for SwapQuoteError
impl Debug for SwapQuoteError
Source§impl Display for SwapQuoteError
impl Display for SwapQuoteError
Source§impl Error for SwapQuoteError
impl Error for SwapQuoteError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ErpcError> for SwapQuoteError
impl From<ErpcError> for SwapQuoteError
Source§impl From<SwapQuoteError> for SwapExecutionError
impl From<SwapQuoteError> for SwapExecutionError
Source§fn from(error: SwapQuoteError) -> Self
fn from(error: SwapQuoteError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SwapQuoteError
impl RefUnwindSafe for SwapQuoteError
impl Send for SwapQuoteError
impl Sync for SwapQuoteError
impl Unpin for SwapQuoteError
impl UnsafeUnpin for SwapQuoteError
impl UnwindSafe for SwapQuoteError
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