DexErrorCode

Enum DexErrorCode 

Source
#[repr(u32)]
pub enum DexErrorCode {
Show 65 variants InvalidMarketFlags = 0, InvalidAskFlags = 1, InvalidBidFlags = 2, InvalidQueueLength = 3, OwnerAccountNotProvided = 4, ConsumeEventsQueueFailure = 5, WrongCoinVault = 6, WrongPcVault = 7, WrongCoinMint = 8, WrongPcMint = 9, CoinVaultProgramId = 10, PcVaultProgramId = 11, CoinMintProgramId = 12, PcMintProgramId = 13, WrongCoinMintSize = 14, WrongPcMintSize = 15, WrongCoinVaultSize = 16, WrongPcVaultSize = 17, UninitializedVault = 18, UninitializedMint = 19, CoinMintUninitialized = 20, PcMintUninitialized = 21, WrongMint = 22, WrongVaultOwner = 23, VaultHasDelegate = 24, AlreadyInitialized = 25, WrongAccountDataAlignment = 26, WrongAccountDataPaddingLength = 27, WrongAccountHeadPadding = 28, WrongAccountTailPadding = 29, RequestQueueEmpty = 30, EventQueueTooSmall = 31, SlabTooSmall = 32, BadVaultSignerNonce = 33, InsufficientFunds = 34, SplAccountProgramId = 35, SplAccountLen = 36, WrongFeeDiscountAccountOwner = 37, WrongFeeDiscountMint = 38, CoinPayerProgramId = 39, PcPayerProgramId = 40, ClientIdNotFound = 41, TooManyOpenOrders = 42, FakeErrorSoWeDontChangeNumbers = 43, BorrowError = 44, WrongOrdersAccount = 45, WrongBidsAccount = 46, WrongAsksAccount = 47, WrongRequestQueueAccount = 48, WrongEventQueueAccount = 49, RequestQueueFull = 50, EventQueueFull = 51, MarketIsDisabled = 52, WrongSigner = 53, TransferFailed = 54, ClientOrderIdIsZero = 55, WrongRentSysvarAccount = 56, RentNotProvided = 57, OrdersNotRentExempt = 58, OrderNotFound = 59, OrderNotYours = 60, WouldSelfTrade = 61, InvalidOpenOrdersAuthority = 62, Unknown = 1_000, AssertionError = 1001,
}

Variants§

§

InvalidMarketFlags = 0

§

InvalidAskFlags = 1

§

InvalidBidFlags = 2

§

InvalidQueueLength = 3

§

OwnerAccountNotProvided = 4

§

ConsumeEventsQueueFailure = 5

§

WrongCoinVault = 6

§

WrongPcVault = 7

§

WrongCoinMint = 8

§

WrongPcMint = 9

§

CoinVaultProgramId = 10

§

PcVaultProgramId = 11

§

CoinMintProgramId = 12

§

PcMintProgramId = 13

§

WrongCoinMintSize = 14

§

WrongPcMintSize = 15

§

WrongCoinVaultSize = 16

§

WrongPcVaultSize = 17

§

UninitializedVault = 18

§

UninitializedMint = 19

§

CoinMintUninitialized = 20

§

PcMintUninitialized = 21

§

WrongMint = 22

§

WrongVaultOwner = 23

§

VaultHasDelegate = 24

§

AlreadyInitialized = 25

§

WrongAccountDataAlignment = 26

§

WrongAccountDataPaddingLength = 27

§

WrongAccountHeadPadding = 28

§

WrongAccountTailPadding = 29

§

RequestQueueEmpty = 30

§

EventQueueTooSmall = 31

§

SlabTooSmall = 32

§

BadVaultSignerNonce = 33

§

InsufficientFunds = 34

§

SplAccountProgramId = 35

§

SplAccountLen = 36

§

WrongFeeDiscountAccountOwner = 37

§

WrongFeeDiscountMint = 38

§

CoinPayerProgramId = 39

§

PcPayerProgramId = 40

§

ClientIdNotFound = 41

§

TooManyOpenOrders = 42

§

FakeErrorSoWeDontChangeNumbers = 43

§

BorrowError = 44

§

WrongOrdersAccount = 45

§

WrongBidsAccount = 46

§

WrongAsksAccount = 47

§

WrongRequestQueueAccount = 48

§

WrongEventQueueAccount = 49

§

RequestQueueFull = 50

§

EventQueueFull = 51

§

MarketIsDisabled = 52

§

WrongSigner = 53

§

TransferFailed = 54

§

ClientOrderIdIsZero = 55

§

WrongRentSysvarAccount = 56

§

RentNotProvided = 57

§

OrdersNotRentExempt = 58

§

OrderNotFound = 59

§

OrderNotYours = 60

§

WouldSelfTrade = 61

§

InvalidOpenOrdersAuthority = 62

§

Unknown = 1_000

§

AssertionError = 1001

Trait Implementations§

Source§

impl Clone for DexErrorCode

Source§

fn clone(&self) -> DexErrorCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for DexErrorCode

Source§

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

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

impl Display for DexErrorCode

Source§

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

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

impl Error for DexErrorCode

1.30.0 · Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<DexErrorCode> for DexError

Source§

fn from(source: DexErrorCode) -> Self

Converts to this type from the input type.
Source§

impl From<DexErrorCode> for u32

Source§

fn from(enum_value: DexErrorCode) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for DexErrorCode

Source§

fn from(number: u32) -> Self

Converts to this type from the input type.
Source§

impl FromPrimitive for DexErrorCode

Source§

type Primitive = u32

Source§

fn from_primitive(number: Self::Primitive) -> Self

Source§

impl PartialEq for DexErrorCode

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFromPrimitive for DexErrorCode

Source§

const NAME: &'static str = "DexErrorCode"

Source§

type Primitive = u32

Source§

fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>

Source§

impl Copy for DexErrorCode

Source§

impl Eq for DexErrorCode

Source§

impl StructuralPartialEq for DexErrorCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> AbiExample for T

Source§

default fn example() -> T

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<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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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