Struct v8::ResolveModuleCallbackRet
source · #[repr(C)]pub struct ResolveModuleCallbackRet(_);
Expand description
Called during Module::instantiate_module. Provided with arguments: (context, specifier, import_assertions, referrer). Return None on error.
Note: this callback has an unusual signature due to ABI incompatibilities between Rust and C++. However end users can implement the callback as follows; it’ll be automatically converted.
ⓘ
fn my_resolve_callback<'a>(
context: v8::Local<'a, v8::Context>,
specifier: v8::Local<'a, v8::String>,
import_assertions: v8::Local<'a, v8::FixedArray>,
referrer: v8::Local<'a, v8::Module>,
) -> Option<v8::Local<'a, v8::Module>> {
// ...
Some(resolved_module)
}