#[repr(C)]
pub struct FastApiCallbackOptions<'a> { pub fallback: bool, pub data: FastApiCallbackData<'a>, pub wasm_memory: *const FastApiTypedArray<u8>, }
Expand description

A struct which may be passed to a fast call callback, like so

void FastMethodWithOptions(int param, FastApiCallbackOptions& options);

Fields§

§fallback: bool

If the callback wants to signal an error condition or to perform an allocation, it must set options.fallback to true and do an early return from the fast method. Then V8 checks the value of options.fallback and if it’s true, falls back to executing the SlowCallback, which is capable of reporting the error (either by throwing a JS exception or logging to the console) or doing the allocation. It’s the embedder’s responsibility to ensure that the fast callback is idempotent up to the point where error and fallback conditions are checked, because otherwise executing the slow callback might produce visible side-effects twice.

§data: FastApiCallbackData<'a>§wasm_memory: *const FastApiTypedArray<u8>

When called from WebAssembly, a view of the calling module’s memory.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.