Struct deno_core::Extension[][src]

pub struct Extension { /* fields omitted */ }

Implementations

impl Extension[src]

pub fn builder() -> ExtensionBuilder[src]

pub fn init_js(&self) -> Vec<(&'static str, &'static str)>[src]

returns JS source code to be loaded into the isolate (either at snapshotting, or at startup). as a vector of a tuple of the file name, and the source code.

pub fn init_ops(&mut self) -> Option<Vec<(&'static str, Box<OpFn>)>>[src]

Called at JsRuntime startup to initialize ops in the isolate.

pub fn init_state(&self, state: &mut OpState) -> Result<(), AnyError>[src]

Allows setting up the initial op-state of an isolate at startup.

pub fn init_middleware(&mut self) -> Option<Box<OpMiddlewareFn>>[src]

init_middleware lets us middleware op registrations, it’s called before init_ops

Trait Implementations

impl Default for Extension[src]

fn default() -> Extension[src]

Returns the “default value” for a type. Read more

Auto Trait Implementations

impl !RefUnwindSafe for Extension

impl !Send for Extension

impl !Sync for Extension

impl Unpin for Extension

impl !UnwindSafe for Extension

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.