pub struct Context<'a> { /* private fields */ }
Expand description
Context for a single invocation of a stateful function.
The context may be used to obtain the Address of the function of the current invocation or the calling function (if the function was invoked by another function), or to access state.
Implementations§
Source§impl<'a> Context<'a>
impl<'a> Context<'a>
Sourcepub fn self_address(&self) -> Address
pub fn self_address(&self) -> Address
Returns the Address of the stateful function that is being called. This is the
statefun equivalent of self
.
Sourcepub fn caller_address(&self) -> Address
pub fn caller_address(&self) -> Address
Returns the Address of the stateful function that caused this function invocation, that is, the caller.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Context<'a>
impl<'a> RefUnwindSafe for Context<'a>
impl<'a> Send for Context<'a>
impl<'a> Sync for Context<'a>
impl<'a> Unpin for Context<'a>
impl<'a> UnwindSafe for Context<'a>
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