pub enum ContractError {
Show 28 variants
Std(StdError),
Unauthorized {},
SemVer(String),
InsufficientFundsSend {},
UnexpectedError {},
InsufficientCollateral {},
PrematureLiquidation {},
DuplicatedLiquidation {},
FailedLiquidation {},
FailedToSerialize {
err_msg: String,
},
FailedToBinary {
err_msg: String,
},
FailedToGetEquityAndTotalMarketValue {
err_msg: String,
},
FailedToGetInsuranceFund {},
FailedToGetOrder {
order_id: String,
},
FailedToFetchBalances {
err_msg: String,
},
InsufficientBalance {},
InsufficientBalanceForFundingPayment {},
InvalidCoinType {},
InvalidPositionEffect {},
InvalidPositionDirection {},
Invalidcw20token {},
InvalidOrderData {},
InsufficientOpenPositionToClose {
intended_close_amount: Decimal,
can_be_closed: Decimal,
},
InvalidDenom {
unsupported_denom: String,
},
TwapNotExist {},
OrderNotFound {},
UnwhitelistedUser {},
InsufficientLiquidity {},
}
Variants§
Std(StdError)
SemVer(String)
InsufficientFundsSend
UnexpectedError
InsufficientCollateral
PrematureLiquidation
DuplicatedLiquidation
FailedLiquidation
FailedToSerialize
FailedToBinary
FailedToGetEquityAndTotalMarketValue
FailedToGetInsuranceFund
FailedToGetOrder
FailedToFetchBalances
InsufficientBalance
InsufficientBalanceForFundingPayment
InvalidCoinType
InvalidPositionEffect
InvalidPositionDirection
Invalidcw20token
InvalidOrderData
InsufficientOpenPositionToClose
InvalidDenom
TwapNotExist
OrderNotFound
UnwhitelistedUser
InsufficientLiquidity
Trait Implementations§
Source§impl Debug for ContractError
impl Debug for ContractError
Source§impl Display for ContractError
impl Display for ContractError
Source§impl Error for ContractError
impl Error for ContractError
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<Error> for ContractError
impl From<Error> for ContractError
Source§impl From<StdError> for ContractError
impl From<StdError> for ContractError
Source§impl PartialEq for ContractError
impl PartialEq for ContractError
impl StructuralPartialEq for ContractError
Auto Trait Implementations§
impl Freeze for ContractError
impl RefUnwindSafe for ContractError
impl Send for ContractError
impl Sync for ContractError
impl Unpin for ContractError
impl UnwindSafe for ContractError
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