Struct deno_core::ExtensionBuilder
source · pub struct ExtensionBuilder { /* private fields */ }
Implementations§
source§impl ExtensionBuilder
impl ExtensionBuilder
pub fn js(&mut self, js_files: Vec<(&'static str, &'static str)>) -> &mut Self
pub fn ops(&mut self, ops: Vec<OpDecl>) -> &mut Self
pub fn state<F>(&mut self, opstate_fn: F) -> &mut Selfwhere
F: Fn(&mut OpState) -> Result<(), Error> + 'static,
pub fn middleware<F>(&mut self, middleware_fn: F) -> &mut Selfwhere
F: Fn(OpDecl) -> OpDecl + 'static,
pub fn event_loop_middleware<F>(&mut self, middleware_fn: F) -> &mut Selfwhere
F: Fn(Rc<RefCell<OpState>>, &mut Context<'_>) -> bool + 'static,
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