pub struct ExecutionContext<'a, 'f, T> { /* private fields */ }Expand description
Mutable execution context available during the Execute phase.
Implementations§
Source§impl<'a, 'f, T> ExecutionContext<'a, 'f, T>
impl<'a, 'f, T> ExecutionContext<'a, 'f, T>
Sourcepub fn program_id(&self) -> &'a Address
pub fn program_id(&self) -> &'a Address
Program ID.
Sourcepub fn borrow_mut(
&mut self,
index: usize,
) -> Result<RefMut<'a, [u8]>, ProgramError>
pub fn borrow_mut( &mut self, index: usize, ) -> Result<RefMut<'a, [u8]>, ProgramError>
Borrow account data mutably with runtime aliasing protection.
Sourcepub fn borrow(&self, index: usize) -> Result<Ref<'a, [u8]>, ProgramError>
pub fn borrow(&self, index: usize) -> Result<Ref<'a, [u8]>, ProgramError>
Borrow account data immutably.
Sourcepub fn account(&self, index: usize) -> Result<&'a AccountView, ProgramError>
pub fn account(&self, index: usize) -> Result<&'a AccountView, ProgramError>
Get raw AccountView by index.
Auto Trait Implementations§
impl<'a, 'f, T> Freeze for ExecutionContext<'a, 'f, T>
impl<'a, 'f, T> RefUnwindSafe for ExecutionContext<'a, 'f, T>where
T: RefUnwindSafe,
impl<'a, 'f, T> Send for ExecutionContext<'a, 'f, T>where
T: Sync,
impl<'a, 'f, T> Sync for ExecutionContext<'a, 'f, T>where
T: Sync,
impl<'a, 'f, T> Unpin for ExecutionContext<'a, 'f, T>
impl<'a, 'f, T> UnsafeUnpin for ExecutionContext<'a, 'f, T>
impl<'a, 'f, T> !UnwindSafe for ExecutionContext<'a, 'f, T>
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