pub struct ResolveModuleCallbackRet(/* private fields */);Expand description
Called during Module::instantiate_module. Provided with arguments: (context, specifier, import_attributes, 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<'s, v8::Context>,
specifier: v8::Local<'s, v8::String>,
import_attributes: v8::Local<'s, v8::FixedArray>,
referrer: v8::Local<'s, v8::Module>,
) -> Option<v8::Local<'s, v8::Module>> {
// ...
Some(resolved_module)
}Auto Trait Implementations§
impl Freeze for ResolveModuleCallbackRet
impl RefUnwindSafe for ResolveModuleCallbackRet
impl !Send for ResolveModuleCallbackRet
impl !Sync for ResolveModuleCallbackRet
impl Unpin for ResolveModuleCallbackRet
impl UnsafeUnpin for ResolveModuleCallbackRet
impl UnwindSafe for ResolveModuleCallbackRet
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