Skip to main content

BridgeErrorCode

Enum BridgeErrorCode 

Source
pub enum BridgeErrorCode {
Show 18 variants InvalidArgument, UnsupportedRoute, ProviderAuthRequired, ProviderTransport, ProviderHttp, ProviderInvalidResponse, QuoteUnavailable, QuoteExpired, QuoteMismatch, BuildInvalid, StatusNotFound, Timeout, Aborted, LocalRpcRequired, SourceRpcTransport, SourceRpcInvalidResponse, LocalPlanInvalid, LocalBuildInvalid,
}
Expand description

Stable error codes for the optional bridge client.

Variants§

§

InvalidArgument

The request or bridge configuration is invalid.

§

UnsupportedRoute

The requested native EURC direction is outside the reviewed routes.

§

ProviderAuthRequired

The provider requires a builder key for this operation.

§

ProviderTransport

The provider could not be reached or returned a redirect.

§

ProviderHttp

The provider returned a non-success HTTP status.

§

ProviderInvalidResponse

The provider body or schema is invalid.

§

QuoteUnavailable

No valid Swift v2 quote was returned.

§

QuoteExpired

A quote is expired or too close to expiry.

§

QuoteMismatch

A supplied quote does not match its signed raw object or request.

§

BuildInvalid

The provider returned an invalid unsigned build.

§

StatusNotFound

The explorer did not find the source transaction.

§

Timeout

The provider request exceeded the configured timeout.

§

Aborted

The caller cancelled the provider request.

§

LocalRpcRequired

A local build needs a configured source-chain RPC endpoint.

§

SourceRpcTransport

The configured source-chain RPC failed to respond.

§

SourceRpcInvalidResponse

The configured source-chain RPC response is invalid.

§

LocalPlanInvalid

A local source-swap plan is invalid.

§

LocalBuildInvalid

A local unsigned build is invalid.

Implementations§

Source§

impl BridgeErrorCode

Source

pub const BRIDGE_INVALID_ARGUMENT: Self = Self::InvalidArgument

Stable spelling for Self::InvalidArgument.

Source

pub const BRIDGE_UNSUPPORTED_ROUTE: Self = Self::UnsupportedRoute

Stable spelling for Self::UnsupportedRoute.

Source

pub const BRIDGE_PROVIDER_AUTH_REQUIRED: Self = Self::ProviderAuthRequired

Stable spelling for Self::ProviderAuthRequired.

Source

pub const BRIDGE_PROVIDER_TRANSPORT: Self = Self::ProviderTransport

Stable spelling for Self::ProviderTransport.

Source

pub const BRIDGE_PROVIDER_HTTP: Self = Self::ProviderHttp

Stable spelling for Self::ProviderHttp.

Source

pub const BRIDGE_PROVIDER_INVALID_RESPONSE: Self = Self::ProviderInvalidResponse

Stable spelling for Self::ProviderInvalidResponse.

Source

pub const BRIDGE_QUOTE_UNAVAILABLE: Self = Self::QuoteUnavailable

Stable spelling for Self::QuoteUnavailable.

Source

pub const BRIDGE_QUOTE_EXPIRED: Self = Self::QuoteExpired

Stable spelling for Self::QuoteExpired.

Source

pub const BRIDGE_QUOTE_MISMATCH: Self = Self::QuoteMismatch

Stable spelling for Self::QuoteMismatch.

Source

pub const BRIDGE_BUILD_INVALID: Self = Self::BuildInvalid

Stable spelling for Self::BuildInvalid.

Source

pub const BRIDGE_STATUS_NOT_FOUND: Self = Self::StatusNotFound

Stable spelling for Self::StatusNotFound.

Source

pub const BRIDGE_TIMEOUT: Self = Self::Timeout

Stable spelling for Self::Timeout.

Source

pub const BRIDGE_ABORTED: Self = Self::Aborted

Stable spelling for Self::Aborted.

Source

pub const BRIDGE_LOCAL_RPC_REQUIRED: Self = Self::LocalRpcRequired

Stable spelling for Self::LocalRpcRequired.

Source

pub const BRIDGE_SOURCE_RPC_TRANSPORT: Self = Self::SourceRpcTransport

Stable spelling for Self::SourceRpcTransport.

Source

pub const BRIDGE_SOURCE_RPC_INVALID_RESPONSE: Self = Self::SourceRpcInvalidResponse

Stable spelling for Self::SourceRpcInvalidResponse.

Source

pub const BRIDGE_LOCAL_PLAN_INVALID: Self = Self::LocalPlanInvalid

Stable spelling for Self::LocalPlanInvalid.

Source

pub const BRIDGE_LOCAL_BUILD_INVALID: Self = Self::LocalBuildInvalid

Stable spelling for Self::LocalBuildInvalid.

Source

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

Returns the stable wire/error code string.

Trait Implementations§

Source§

impl Clone for BridgeErrorCode

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 BridgeErrorCode

Source§

impl Debug for BridgeErrorCode

Source§

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

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

impl Display for BridgeErrorCode

Source§

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

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

impl Eq for BridgeErrorCode

Source§

impl PartialEq for BridgeErrorCode

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 BridgeErrorCode

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