pub struct SingleUseGuestCallContext { /* private fields */ }Expand description
A context for calling guest functions. Can only be created from an existing
SingleUseSandbox, and once created, guest functions against that sandbox
can be made from this until it is dropped.
Implementations§
Source§impl SingleUseGuestCallContext
impl SingleUseGuestCallContext
Sourcepub fn call_from_func<Fn: FnOnce(&mut SingleUseMultiGuestCallContext) -> Result<ReturnValue>>(
self,
f: Fn,
) -> Result<ReturnValue>
pub fn call_from_func<Fn: FnOnce(&mut SingleUseMultiGuestCallContext) -> Result<ReturnValue>>( self, f: Fn, ) -> Result<ReturnValue>
This function allows for a SingleUseSandbox to be used to make multiple calls to guest functions before it is dropped.
The function is passed a callback function that it then callsd with a reference to a ‘SingleUseMultiGuestCallContext’ that can be used to make multiple calls to guest functions.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SingleUseGuestCallContext
impl RefUnwindSafe for SingleUseGuestCallContext
impl Send for SingleUseGuestCallContext
impl !Sync for SingleUseGuestCallContext
impl Unpin for SingleUseGuestCallContext
impl UnwindSafe for SingleUseGuestCallContext
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