Struct deno_core::ExtensionBuilder
source · pub struct ExtensionBuilder { /* private fields */ }
Implementations
sourceimpl 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
sourceimpl Default for ExtensionBuilder
impl Default for ExtensionBuilder
sourcefn 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
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