pub struct ResumableCallOutOfFuel { /* private fields */ }Expand description
State required to resume a Func invocation after a host trap.
Implementations§
Source§impl ResumableCallOutOfFuel
impl ResumableCallOutOfFuel
Sourcepub fn required_fuel(&self) -> u64
pub fn required_fuel(&self) -> u64
Returns the minimum required fuel to progress execution.
Sourcepub fn resume<T>(
self,
ctx: impl AsContextMut<Data = T>,
outputs: &mut [Val],
) -> Result<ResumableCall, Error>
pub fn resume<T>( self, ctx: impl AsContextMut<Data = T>, outputs: &mut [Val], ) -> Result<ResumableCall, Error>
Resumes the call to the Func with the given inputs.
The result is written back into the outputs buffer upon success.
Returns a resumable handle to the function invocation.
§Errors
- If the function resumption returned a Wasm
Error. - If the types or the number of values in
inputsdoes not match the types and number of result values of the erroneous host function. - If the number of output values does not match the expected number of outputs required by the called function.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ResumableCallOutOfFuel
impl !RefUnwindSafe for ResumableCallOutOfFuel
impl Send for ResumableCallOutOfFuel
impl Sync for ResumableCallOutOfFuel
impl Unpin for ResumableCallOutOfFuel
impl !UnwindSafe for ResumableCallOutOfFuel
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