pub enum ProgramError {
Show 26 variants
Custom(u32),
InvalidArgument,
InvalidInstructionData,
InvalidAccountData,
AccountDataTooSmall,
InsufficientFunds,
IncorrectProgramId,
MissingRequiredSignature,
AccountAlreadyInitialized,
UninitializedAccount,
NotEnoughAccountKeys,
AccountBorrowFailed,
MaxSeedLengthExceeded,
InvalidSeeds,
BorshIoError,
AccountNotRentExempt,
UnsupportedSysvar,
IllegalOwner,
MaxAccountsDataAllocationsExceeded,
InvalidRealloc,
MaxInstructionTraceLengthExceeded,
BuiltinProgramsMustConsumeComputeUnits,
InvalidAccountOwner,
ArithmeticOverflow,
Immutable,
IncorrectAuthority,
}Expand description
Errors that a Solana program can return.
Variants§
Custom(u32)
Custom program error with a u32 code.
InvalidArgument
InvalidInstructionData
InvalidAccountData
AccountDataTooSmall
InsufficientFunds
IncorrectProgramId
MissingRequiredSignature
AccountAlreadyInitialized
UninitializedAccount
NotEnoughAccountKeys
AccountBorrowFailed
MaxSeedLengthExceeded
InvalidSeeds
BorshIoError
AccountNotRentExempt
UnsupportedSysvar
IllegalOwner
MaxAccountsDataAllocationsExceeded
InvalidRealloc
MaxInstructionTraceLengthExceeded
BuiltinProgramsMustConsumeComputeUnits
InvalidAccountOwner
ArithmeticOverflow
Immutable
IncorrectAuthority
Trait Implementations§
Source§impl Clone for ProgramError
impl Clone for ProgramError
Source§fn clone(&self) -> ProgramError
fn clone(&self) -> ProgramError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProgramError
impl Debug for ProgramError
Source§impl Display for ProgramError
impl Display for ProgramError
Source§impl From<ProgramError> for ProgramError
Available on crate feature hopper-native-backend only.Convert between Hopper and backend ProgramError via u64 error codes.
impl From<ProgramError> for ProgramError
Available on crate feature
hopper-native-backend only.Convert between Hopper and backend ProgramError via u64 error codes.
Both types encode errors as the same u64 values, so we round-trip through the integer representation. This is zero-cost in the happy path (errors are exceptional).
Source§fn from(e: ProgramError) -> ProgramError
fn from(e: ProgramError) -> ProgramError
Converts to this type from the input type.
Source§impl From<ProgramError> for ProgramError
Available on crate feature hopper-native-backend only.
impl From<ProgramError> for ProgramError
Available on crate feature
hopper-native-backend only.Source§fn from(e: ProgramError) -> ProgramError
fn from(e: ProgramError) -> ProgramError
Converts to this type from the input type.
Source§impl From<u64> for ProgramError
impl From<u64> for ProgramError
Source§fn from(code: u64) -> ProgramError
fn from(code: u64) -> ProgramError
Converts to this type from the input type.
Source§impl PartialEq for ProgramError
impl PartialEq for ProgramError
Source§fn eq(&self, other: &ProgramError) -> bool
fn eq(&self, other: &ProgramError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ProgramError
impl StructuralPartialEq for ProgramError
Auto Trait Implementations§
impl Freeze for ProgramError
impl RefUnwindSafe for ProgramError
impl Send for ProgramError
impl Sync for ProgramError
impl Unpin for ProgramError
impl UnsafeUnpin for ProgramError
impl UnwindSafe for ProgramError
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