Enum spl_token::error::TokenError[][src]

pub enum TokenError {
Show variants NotRentExempt, InsufficientFunds, InvalidMint, MintMismatch, OwnerMismatch, FixedSupply, AlreadyInUse, InvalidNumberOfProvidedSigners, InvalidNumberOfRequiredSigners, UninitializedState, NativeNotSupported, NonNativeHasBalance, InvalidInstruction, InvalidState, Overflow, AuthorityTypeNotSupported, MintCannotFreeze, AccountFrozen, MintDecimalsMismatch,
}
Expand description

Errors that may be returned by the Token program.

Variants

NotRentExempt
Expand description

Lamport balance below rent-exempt threshold.

InsufficientFunds
Expand description

Insufficient funds for the operation requested.

InvalidMint
Expand description

Invalid Mint.

MintMismatch
Expand description

Account not associated with this Mint.

OwnerMismatch
Expand description

Owner does not match.

FixedSupply
Expand description

This token’s supply is fixed and new tokens cannot be minted.

AlreadyInUse
Expand description

The account cannot be initialized because it is already being used.

InvalidNumberOfProvidedSigners
Expand description

Invalid number of provided signers.

InvalidNumberOfRequiredSigners
Expand description

Invalid number of required signers.

UninitializedState
Expand description

State is uninitialized.

NativeNotSupported
Expand description

Instruction does not support native tokens

NonNativeHasBalance
Expand description

Non-native account can only be closed if its balance is zero

InvalidInstruction
Expand description

Invalid instruction

InvalidState
Expand description

State is invalid for requested operation.

Overflow
Expand description

Operation overflowed

AuthorityTypeNotSupported
Expand description

Account does not support specified authority type.

MintCannotFreeze
Expand description

This token mint cannot freeze accounts.

AccountFrozen
Expand description

Account is frozen; all account operations will fail

MintDecimalsMismatch
Expand description

Mint decimals mismatch between the client and mint

Trait Implementations

impl Clone for TokenError[src]

fn clone(&self) -> TokenError[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for TokenError[src]

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

Formats the value using the given formatter. Read more

impl<T> DecodeError<T> for TokenError[src]

fn type_of() -> &'static str[src]

fn decode_custom_error_to_enum(custom: u32) -> Option<E> where
    E: FromPrimitive
[src]

impl Display for TokenError[src]

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Error for TokenError[src]

fn source(&self) -> Option<&(dyn Error + 'static)>1.30.0[src]

The lower-level source of this error, if any. Read more

fn backtrace(&self) -> Option<&Backtrace>[src]

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

fn description(&self) -> &str1.0.0[src]

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

fn cause(&self) -> Option<&dyn Error>1.0.0[src]

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

impl FromPrimitive for TokenError[src]

fn from_i64(n: i64) -> Option<Self>[src]

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_u64(n: u64) -> Option<Self>[src]

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_isize(n: isize) -> Option<Self>[src]

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_i8(n: i8) -> Option<Self>[src]

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_i16(n: i16) -> Option<Self>[src]

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_i32(n: i32) -> Option<Self>[src]

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_i128(n: i128) -> Option<Self>[src]

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_usize(n: usize) -> Option<Self>[src]

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_u8(n: u8) -> Option<Self>[src]

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_u16(n: u16) -> Option<Self>[src]

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_u32(n: u32) -> Option<Self>[src]

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_u128(n: u128) -> Option<Self>[src]

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_f32(n: f32) -> Option<Self>[src]

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

fn from_f64(n: f64) -> Option<Self>[src]

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

impl PartialEq<TokenError> for TokenError[src]

fn eq(&self, other: &TokenError) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PrintProgramError for TokenError[src]

fn print<E>(&self) where
    E: 'static + Error + DecodeError<E> + PrintProgramError + FromPrimitive
[src]

impl Eq for TokenError[src]

impl StructuralEq for TokenError[src]

impl StructuralPartialEq for TokenError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> AbiExample for T

pub default fn example() -> T

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V