Enum solana_sdk::instruction::InstructionError [−][src]
pub enum InstructionError {}Show variants
GenericError, InvalidArgument, InvalidInstructionData, InvalidAccountData, AccountDataTooSmall, InsufficientFunds, IncorrectProgramId, MissingRequiredSignature, AccountAlreadyInitialized, UninitializedAccount, UnbalancedInstruction, ModifiedProgramId, ExternalAccountLamportSpend, ExternalAccountDataModified, ReadonlyLamportChange, ReadonlyDataModified, DuplicateAccountIndex, ExecutableModified, RentEpochModified, NotEnoughAccountKeys, AccountDataSizeChanged, AccountNotExecutable, AccountBorrowFailed, AccountBorrowOutstanding, DuplicateAccountOutOfSync, Custom(u32), InvalidError, ExecutableDataModified, ExecutableLamportChange, ExecutableAccountNotRentExempt, UnsupportedProgramId, CallDepth, MissingAccount, ReentrancyNotAllowed, MaxSeedLengthExceeded, InvalidSeeds, InvalidRealloc, ComputationalBudgetExceeded, PrivilegeEscalation, ProgramEnvironmentSetupFailure, ProgramFailedToComplete, ProgramFailedToCompile, Immutable, IncorrectAuthority, BorshIoError(String), AccountNotRentExempt, InvalidAccountOwner, ArithmeticOverflow, UnsupportedSysvar,
Expand description
Reasons the runtime might have rejected an instruction.
Variants
Expand description
Deprecated! Use CustomError instead! The program instruction returned an error
Expand description
The arguments provided to a program were invalid
Expand description
An instruction’s data contents were invalid
Expand description
An account’s data contents was invalid
Expand description
An account’s data was too small
Expand description
An account’s balance was too small to complete the instruction
Expand description
The account did not have the expected program id
Expand description
A signature was required but not found
Expand description
An initialize instruction was sent to an account that has already been initialized.
Expand description
An attempt to operate on an account that hasn’t been initialized.
Expand description
Program’s instruction lamport balance does not equal the balance after the instruction
Expand description
Program modified an account’s program id
Expand description
Program spent the lamports of an account that doesn’t belong to it
Expand description
Program modified the data of an account that doesn’t belong to it
Expand description
Read-only account’s lamports modified
Expand description
Read-only account’s data was modified
Expand description
An account was referenced more than once in a single instruction
Expand description
Executable bit on account changed, but shouldn’t have
Expand description
Rent_epoch account changed, but shouldn’t have
Expand description
The instruction expected additional account keys
Expand description
A non-system program changed the size of the account data
Expand description
The instruction expected an executable account
Expand description
Failed to borrow a reference to account data, already borrowed
Expand description
Account data has an outstanding reference after a program’s execution
Expand description
The same account was multiply passed to an on-chain program’s entrypoint, but the program modified them differently. A program can only modify one instance of the account because the runtime cannot determine which changes to pick or how to merge them if both are modified
Custom(u32)
Expand description
Allows on-chain programs to implement program-specific error types and see them returned by the Solana runtime. A program-specific error may be any type that is represented as or serialized to a u32 integer.
Expand description
The return value from the program was invalid. Valid errors are either a defined builtin error value or a user-defined error in the lower 32 bits.
Expand description
Executable account’s data was modified
Expand description
Executable account’s lamports modified
Expand description
Executable accounts must be rent exempt
Expand description
Unsupported program id
Expand description
Cross-program invocation call depth too deep
Expand description
An account required by the instruction is missing
Expand description
Cross-program invocation reentrancy not allowed for this instruction
Expand description
Length of the seed is too long for address generation
Expand description
Provided seeds do not result in a valid address
Expand description
Failed to reallocate account data of this length
Expand description
Computational budget exceeded
Expand description
Cross-program invocation with unauthorized signer or writable account
Expand description
Failed to create program execution environment
Expand description
Program failed to complete
Expand description
Program failed to compile
Expand description
Account is immutable
Expand description
Incorrect authority provided
BorshIoError(String)
Expand description
Failed to serialize or deserialize account data
Expand description
An account does not have enough lamports to be rent-exempt
Expand description
Invalid account owner
Expand description
Program arithmetic overflowed
Expand description
Unsupported sysvar
Trait Implementations
impl AbiEnumVisitor for InstructionError
[src]
impl AbiEnumVisitor for InstructionError
[src]pub fn visit_for_abi(
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
[src]
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
impl AbiExample for InstructionError
[src]
impl AbiExample for InstructionError
[src]pub fn example() -> InstructionError
[src]
impl Clone for InstructionError
[src]
impl Clone for InstructionError
[src]pub fn clone(&self) -> InstructionError
[src]
pub fn clone(&self) -> InstructionError
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for InstructionError
[src]
impl Debug for InstructionError
[src]impl<'de> Deserialize<'de> for InstructionError
[src]
impl<'de> Deserialize<'de> for InstructionError
[src]pub fn deserialize<__D>(
__deserializer: __D
) -> Result<InstructionError, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<InstructionError, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl Display for InstructionError
[src]
impl Display for InstructionError
[src]impl Error for InstructionError
[src]
impl Error for InstructionError
[src]fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[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]
fn backtrace(&self) -> Option<&Backtrace>
[src]backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0[src]
fn description(&self) -> &str
1.0.0[src]use the Display impl or to_string()
impl<T> From<T> for InstructionError where
T: ToPrimitive,
[src]
impl<T> From<T> for InstructionError where
T: ToPrimitive,
[src]pub fn from(error: T) -> InstructionError
[src]
pub fn from(error: T) -> InstructionError
[src]Performs the conversion.
impl PartialEq<InstructionError> for InstructionError
[src]
impl PartialEq<InstructionError> for InstructionError
[src]pub fn eq(&self, other: &InstructionError) -> bool
[src]
pub fn eq(&self, other: &InstructionError) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
pub fn ne(&self, other: &InstructionError) -> bool
[src]
pub fn ne(&self, other: &InstructionError) -> bool
[src]This method tests for !=
.
impl Serialize for InstructionError
[src]
impl Serialize for InstructionError
[src]pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]Serialize this value into the given Serde serializer. Read more
impl TryFrom<InstructionError> for ProgramError
[src]
impl TryFrom<InstructionError> for ProgramError
[src]type Error = InstructionError
type Error = InstructionError
The type returned in the event of a conversion error.
pub fn try_from(
error: InstructionError
) -> Result<ProgramError, <ProgramError as TryFrom<InstructionError>>::Error>
[src]
pub fn try_from(
error: InstructionError
) -> Result<ProgramError, <ProgramError as TryFrom<InstructionError>>::Error>
[src]Performs the conversion.
impl Eq for InstructionError
[src]
impl StructuralEq for InstructionError
[src]
impl StructuralPartialEq for InstructionError
[src]
Auto Trait Implementations
impl RefUnwindSafe for InstructionError
impl Send for InstructionError
impl Sync for InstructionError
impl Unpin for InstructionError
impl UnwindSafe for InstructionError
Blanket Implementations
impl<T> AbiEnumVisitor for T where
T: Serialize + AbiExample + ?Sized,
[src]
impl<T> AbiEnumVisitor for T where
T: Serialize + AbiExample + ?Sized,
[src]pub default fn visit_for_abi(
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
[src]
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
impl<T> AbiEnumVisitor for T where
T: Serialize + ?Sized,
[src]
impl<T> AbiEnumVisitor for T where
T: Serialize + ?Sized,
[src]pub default fn visit_for_abi(
&self,
_digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
[src]
&self,
_digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
impl<T> AbiExample for T
[src]
impl<T> AbiExample for T
[src]impl<T> AsFail for T where
T: Fail,
impl<T> AsFail for T where
T: Fail,
pub fn as_fail(&self) -> &(dyn Fail + 'static)
pub fn as_fail(&self) -> &(dyn Fail + 'static)
Converts a reference to Self
into a dynamic trait object of Fail
.
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<E> Fail for E where
E: 'static + Error + Send + Sync,
impl<E> Fail for E where
E: 'static + Error + Send + Sync,
fn cause(&self) -> Option<&(dyn Fail + 'static)>
fn cause(&self) -> Option<&(dyn Fail + 'static)>
Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more
fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the Backtrace
carried by this failure, if it
carries one. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
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]
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<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,