pub struct ValidatedFrame<'a, T> { /* private fields */ }Expand description
A frame whose accounts have been validated.
Implementations§
Source§impl<'a, T> ValidatedFrame<'a, T>
impl<'a, T> ValidatedFrame<'a, T>
Sourcepub fn execute_with_args<A, R, F>(
self,
args: &A,
f: F,
) -> Result<R, ProgramError>
pub fn execute_with_args<A, R, F>( self, args: &A, f: F, ) -> Result<R, ProgramError>
Execute with access to typed instruction args.
This is the arg-aware counterpart of execute().
Source§impl<'a, T> ValidatedFrame<'a, T>
impl<'a, T> ValidatedFrame<'a, T>
Sourcepub fn program_id(&self) -> &Address
pub fn program_id(&self) -> &Address
Program ID.
Sourcepub fn execute<R, F>(self, f: F) -> Result<R, ProgramError>
pub fn execute<R, F>(self, f: F) -> Result<R, ProgramError>
Execute the instruction logic.
The closure receives an ExecutionContext with mutable access to
the validated accounts and mutable borrow tracking.
ⓘ
validated.execute(|ctx| {
let vault_data = ctx.borrow_mut(1)?;
// ... mutate state ...
Ok(())
})?;Auto Trait Implementations§
impl<'a, T> Freeze for ValidatedFrame<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for ValidatedFrame<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for ValidatedFrame<'a, T>where
T: Send,
impl<'a, T> Sync for ValidatedFrame<'a, T>where
T: Sync,
impl<'a, T> Unpin for ValidatedFrame<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for ValidatedFrame<'a, T>where
T: UnsafeUnpin,
impl<'a, T> UnwindSafe for ValidatedFrame<'a, T>where
T: UnwindSafe,
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