Enum solana_sdk::sysvar::slot_history::ProgramError [−][src]
pub enum ProgramError {}Show 18 variants
Custom(u32), InvalidArgument, InvalidInstructionData, InvalidAccountData, AccountDataTooSmall, InsufficientFunds, IncorrectProgramId, MissingRequiredSignature, AccountAlreadyInitialized, UninitializedAccount, NotEnoughAccountKeys, AccountBorrowFailed, MaxSeedLengthExceeded, InvalidSeeds, BorshIoError(String), AccountNotRentExempt, UnsupportedSysvar, IllegalOwner,
Expand description
Reasons the program may fail
Variants
Custom(u32)
Allows on-chain programs to implement program-specific error types and see them returned by the Safecoin runtime. A program-specific error may be any type that is represented as or serialized to a u32 integer.
BorshIoError(String)
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<ProgramError, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<ProgramError, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Performs the conversion.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
pub fn print<E>(&self) where
E: 'static + Error + DecodeError<E> + PrintProgramError + FromPrimitive,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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>
pub fn try_from(
error: InstructionError
) -> Result<ProgramError, <ProgramError as TryFrom<InstructionError>>::Error>
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for ProgramError
impl Send for ProgramError
impl Sync for ProgramError
impl Unpin for ProgramError
impl UnwindSafe for ProgramError
Blanket Implementations
pub default fn visit_for_abi(
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
pub default fn visit_for_abi(
&self,
_digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
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
.
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self