pub enum VAError {
MissingSigner {
field: &'static str,
},
NotWritable {
field: &'static str,
},
WrongOwner {
field: &'static str,
},
NotEnoughAccounts {
expected: usize,
got: usize,
},
WrongHasOne {
field: &'static str,
target: &'static str,
},
InitFailed {
field: &'static str,
},
CloseFailed {
field: &'static str,
},
WrongPda {
field: &'static str,
},
WrongBump {
field: &'static str,
},
WrongDiscriminator {
field: &'static str,
},
BorshFailed {
field: &'static str,
},
}Expand description
Why account validation failed. field is the struct field name that failed.
Variants§
MissingSigner
NotWritable
WrongOwner
NotEnoughAccounts
Fewer accounts were supplied than the struct declares.
WrongHasOne
InitFailed
CloseFailed
WrongPda
WrongBump
WrongDiscriminator
BorshFailed
Trait Implementations§
Source§impl Error for VAError
impl Error for VAError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<VAError> for ProgramError
So a handler returning ProgramResult can use Transfer::try_accounts(...)? directly.
Each variant maps to a distinct custom code so clients can disambiguate the failed check.
impl From<VAError> for ProgramError
So a handler returning ProgramResult can use Transfer::try_accounts(...)? directly.
Each variant maps to a distinct custom code so clients can disambiguate the failed check.
impl Eq for VAError
impl StructuralPartialEq for VAError
Auto Trait Implementations§
impl Freeze for VAError
impl RefUnwindSafe for VAError
impl Send for VAError
impl Sync for VAError
impl Unpin for VAError
impl UnsafeUnpin for VAError
impl UnwindSafe for VAError
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