[−][src]Type Definition rusty_v8_m::ResolveCallback
type ResolveCallback<'a> = extern "C" fn(_: Local<'a, Context>, _: Local<'a, String>, _: Local<'a, Module>) -> *const Module;
Called during Module::instantiate_module. Provided with arguments: (context, specifier, 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.
ⓘThis example is not tested
fn my_resolve_callback<'a>( context: v8::Local<'a, v8::Context>, specifier: v8::Local<'a, v8::String>, referrer: v8::Local<'a, v8::Module>, ) -> Option<v8::Local<'a, v8::Module>> { // ... Some(resolved_module) }