Struct deno_core::ExtensionBuilder
source · pub struct ExtensionBuilder { /* private fields */ }
Implementations§
source§impl ExtensionBuilder
impl ExtensionBuilder
pub fn js(&mut self, js_files: Vec<ExtensionFileSource>) -> &mut Self
pub fn esm(&mut self, esm_files: Vec<ExtensionFileSource>) -> &mut Self
pub fn esm_entry_point(&mut self, entry_point: &'static str) -> &mut Self
pub fn ops(&mut self, ops: Vec<OpDecl>) -> &mut Self
pub fn state<F>(&mut self, op_state_fn: F) -> &mut Self
pub fn middleware<F>(&mut self, middleware_fn: F) -> &mut Self
pub fn event_loop_middleware<F>( &mut self, middleware_fn: fn(_: Rc<RefCell<OpState>>, _: &mut Context<'_>) -> bool ) -> &mut Self
pub fn global_template_middleware<F>( &mut self, middleware_fn: for<'s> fn(_: &mut HandleScope<'s, ()>, _: Local<'s, ObjectTemplate>) -> Local<'s, ObjectTemplate> ) -> &mut Self
pub fn global_object_middleware<F>( &mut self, middleware_fn: for<'s> fn(_: &mut HandleScope<'s>, _: Local<'s, Object>) ) -> &mut Self
pub fn external_references( &mut self, external_references: Vec<ExternalReference<'static>> ) -> &mut Self
sourcepub fn take(self) -> Extension
pub fn take(self) -> Extension
Consume the ExtensionBuilder
and return an Extension
.
pub fn build(&mut self) -> Extension
Trait Implementations§
source§impl Default for ExtensionBuilder
impl Default for ExtensionBuilder
source§fn default() -> ExtensionBuilder
fn default() -> ExtensionBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ExtensionBuilder
impl !Send for ExtensionBuilder
impl !Sync for ExtensionBuilder
impl Unpin for ExtensionBuilder
impl !UnwindSafe for ExtensionBuilder
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