#[repr(u32)]pub enum ErrorCode {
Show 21 variants
ContractAddressNotCorrect = 0,
EmptySupply = 1,
InvalidFee = 2,
InvalidCurve = 3,
ZeroTradingTokens = 4,
ExceededSlippage = 5,
ConversionFailure = 6,
UnsupportedCurveOperation = 7,
FeeCalculationFailure = 8,
PrivilegeRequired = 9,
WrongLPMint = 10,
SameToken = 11,
CalculationFailure = 12,
IncorrectSwapAccount = 13,
MintMismatch = 14,
MintNotExpected = 15,
WrongATAOwner = 16,
TokenNotSupportedByPool = 17,
WrongAdmin = 18,
Suspended = 19,
WrongFeeVault = 20,
}
Variants§
ContractAddressNotCorrect = 0
EmptySupply = 1
InvalidFee = 2
InvalidCurve = 3
ZeroTradingTokens = 4
ExceededSlippage = 5
ConversionFailure = 6
UnsupportedCurveOperation = 7
FeeCalculationFailure = 8
PrivilegeRequired = 9
WrongLPMint = 10
SameToken = 11
CalculationFailure = 12
IncorrectSwapAccount = 13
MintMismatch = 14
MintNotExpected = 15
WrongATAOwner = 16
TokenNotSupportedByPool = 17
WrongAdmin = 18
Suspended = 19
WrongFeeVault = 20
Trait Implementations§
Source§impl Error for ErrorCode
impl Error for ErrorCode
1.30.0 · 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<ErrorCode> for ProgramError
impl From<ErrorCode> for ProgramError
Source§fn from(e: ErrorCode) -> ProgramError
fn from(e: ErrorCode) -> ProgramError
Converts to this type from the input type.
impl Copy for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
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