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)
}
Auto Trait Implementations
impl RefUnwindSafe for ResolveModuleCallbackRet
impl !Send for ResolveModuleCallbackRet
impl !Sync for ResolveModuleCallbackRet
impl Unpin for ResolveModuleCallbackRet
impl UnwindSafe for ResolveModuleCallbackRet
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more