pub enum SinglePoolError {
Show 20 variants
InvalidPoolAccount,
InvalidPoolStakeAccount,
InvalidPoolMint,
InvalidPoolStakeAuthority,
InvalidPoolMintAuthority,
InvalidPoolMplAuthority,
InvalidMetadataAccount,
InvalidMetadataSigner,
DepositTooSmall,
WithdrawalTooSmall,
WithdrawalTooLarge,
SignatureMissing,
WrongStakeStake,
ArithmeticOverflow,
UnexpectedMathError,
LegacyVoteAccount,
UnparseableVoteAccount,
WrongRentAmount,
InvalidPoolStakeAccountUsage,
PoolAlreadyInitialized,
}Expand description
Errors that may be returned by the SinglePool program.
Variants§
InvalidPoolAccount
Provided pool account has the wrong address for its vote account, is uninitialized, or otherwise invalid.
InvalidPoolStakeAccount
Provided pool stake account does not match address derived from the pool account.
InvalidPoolMint
Provided pool mint does not match address derived from the pool account.
InvalidPoolStakeAuthority
Provided pool stake authority does not match address derived from the pool account.
InvalidPoolMintAuthority
Provided pool mint authority does not match address derived from the pool account.
InvalidPoolMplAuthority
Provided pool MPL authority does not match address derived from the pool account.
InvalidMetadataAccount
Provided metadata account does not match metadata account derived for pool mint.
InvalidMetadataSigner
Authorized withdrawer provided for metadata update does not match the vote account.
DepositTooSmall
Not enough lamports provided for deposit to result in one pool token.
WithdrawalTooSmall
Not enough pool tokens provided to withdraw stake worth one lamport.
WithdrawalTooLarge
Not enough stake to cover the provided quantity of pool tokens. (Generally this should not happen absent user error, but may if the minimum delegation increases.)
SignatureMissing
Required signature is missing.
WrongStakeStake
Stake account is not in the state expected by the program.
ArithmeticOverflow
Unsigned subtraction crossed the zero.
UnexpectedMathError
A calculation failed unexpectedly. (This error should never be surfaced; it stands in for failure conditions that should never be reached.)
LegacyVoteAccount
The V0_23_5 vote account type is unsupported and should be upgraded via
convert_to_current().
UnparseableVoteAccount
Failed to parse vote account.
WrongRentAmount
Incorrect number of lamports provided for rent-exemption when initializing.
InvalidPoolStakeAccountUsage
Attempted to deposit from or withdraw to pool stake account.
PoolAlreadyInitialized
Attempted to initialize a pool that is already initialized.
Trait Implementations§
Source§impl Clone for SinglePoolError
impl Clone for SinglePoolError
Source§fn clone(&self) -> SinglePoolError
fn clone(&self) -> SinglePoolError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SinglePoolError
impl Debug for SinglePoolError
Source§impl<T> DecodeError<T> for SinglePoolError
impl<T> DecodeError<T> for SinglePoolError
fn type_of() -> &'static str
fn decode_custom_error_to_enum(custom: u32) -> Option<E>where
E: FromPrimitive,
Source§impl Display for SinglePoolError
impl Display for SinglePoolError
Source§impl Error for SinglePoolError
impl Error for SinglePoolError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<SinglePoolError> for ProgramError
impl From<SinglePoolError> for ProgramError
Source§fn from(e: SinglePoolError) -> Self
fn from(e: SinglePoolError) -> Self
Source§impl FromPrimitive for SinglePoolError
impl FromPrimitive for SinglePoolError
Source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
i64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
u64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
isize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
i8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
i16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
i32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
i128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
usize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
u8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
u16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
u32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
u128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read more