Skip to main content

SwapQuoteErrorCode

Enum SwapQuoteErrorCode 

Source
pub enum SwapQuoteErrorCode {
Show 15 variants InvalidArgument, UnsupportedChain, UnknownPool, ChainMismatch, InvalidPoolState, UnknownToken, TokenNotActive, UnsupportedTokenStandard, UnsupportedToken, PoolTokenMismatch, UnsupportedAdapter, ProgramMismatch, StateStale, InsufficientLiquidity, Arithmetic,
}
Expand description

Fixed domain error codes for exact-input quote validation.

Variants§

§

InvalidArgument

The request shape, identifiers, amount, or freshness values are invalid.

§

UnsupportedChain

The requested chain is not represented by the DEX catalog.

§

UnknownPool

The requested pool identifier is unknown.

§

ChainMismatch

The selected pool or token record is on another chain.

§

InvalidPoolState

A selected pool or DEX record is not active or otherwise valid.

§

UnknownToken

An input or output token identifier is unknown.

§

TokenNotActive

A selected token record is not active.

§

UnsupportedTokenStandard

A selected token standard is outside the quote adapter boundary.

§

UnsupportedToken

The selected token or pool is outside the reviewed quote capability.

§

PoolTokenMismatch

The requested pair is not the selected pool pair.

§

UnsupportedAdapter

The selected pool adapter cannot produce this quote.

§

ProgramMismatch

The on-chain factory or pool program identity does not match the catalog.

§

StateStale

The block snapshot is stale, inconsistent, or reorged.

§

InsufficientLiquidity

The pool has no usable liquidity for the requested direction.

§

Arithmetic

A checked uint256 calculation or fee configuration is invalid.

Implementations§

Source§

impl SwapQuoteErrorCode

Source

pub const SWAP_INVALID_ARGUMENT: Self = Self::InvalidArgument

Stable spelling for Self::InvalidArgument.

Source

pub const SWAP_UNSUPPORTED_CHAIN: Self = Self::UnsupportedChain

Stable spelling for Self::UnsupportedChain.

Source

pub const SWAP_UNKNOWN_POOL: Self = Self::UnknownPool

Stable spelling for Self::UnknownPool.

Source

pub const SWAP_CHAIN_MISMATCH: Self = Self::ChainMismatch

Stable spelling for Self::ChainMismatch.

Source

pub const SWAP_INVALID_POOL_STATE: Self = Self::InvalidPoolState

Stable spelling for Self::InvalidPoolState.

Source

pub const SWAP_UNKNOWN_TOKEN: Self = Self::UnknownToken

Stable spelling for Self::UnknownToken.

Source

pub const SWAP_TOKEN_NOT_ACTIVE: Self = Self::TokenNotActive

Stable spelling for Self::TokenNotActive.

Source

pub const SWAP_UNSUPPORTED_TOKEN_STANDARD: Self = Self::UnsupportedTokenStandard

Stable spelling for Self::UnsupportedTokenStandard.

Source

pub const SWAP_UNSUPPORTED_TOKEN: Self = Self::UnsupportedToken

Stable spelling for Self::UnsupportedToken.

Source

pub const SWAP_POOL_TOKEN_MISMATCH: Self = Self::PoolTokenMismatch

Stable spelling for Self::PoolTokenMismatch.

Source

pub const SWAP_UNSUPPORTED_ADAPTER: Self = Self::UnsupportedAdapter

Stable spelling for Self::UnsupportedAdapter.

Source

pub const SWAP_PROGRAM_MISMATCH: Self = Self::ProgramMismatch

Stable spelling for Self::ProgramMismatch.

Source

pub const SWAP_STATE_STALE: Self = Self::StateStale

Stable spelling for Self::StateStale.

Source

pub const SWAP_INSUFFICIENT_LIQUIDITY: Self = Self::InsufficientLiquidity

Stable spelling for Self::InsufficientLiquidity.

Source

pub const SWAP_ARITHMETIC: Self = Self::Arithmetic

Stable spelling for Self::Arithmetic.

Source

pub const fn as_str(self) -> &'static str

Returns the stable wire/error code string.

Trait Implementations§

Source§

impl Clone for SwapQuoteErrorCode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SwapQuoteErrorCode

Source§

impl Debug for SwapQuoteErrorCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for SwapQuoteErrorCode

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for SwapQuoteErrorCode

Source§

impl PartialEq for SwapQuoteErrorCode

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SwapQuoteErrorCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more