[][src]Struct rusty_v8_m::Script

#[repr(C)]pub struct Script(_);

A compiled JavaScript script, tied to a Context which was active when the script was compiled.

Methods

impl Script[src]

pub fn compile<'sc>(
    scope: &mut impl ToLocal<'sc>,
    context: Local<Context>,
    source: Local<String>,
    origin: Option<&ScriptOrigin>
) -> Option<Local<'sc, Script>>
[src]

A shorthand for ScriptCompiler::Compile().

pub fn run<'sc>(
    &mut self,
    scope: &mut impl ToLocal<'sc>,
    context: Local<Context>
) -> Option<Local<'sc, Value>>
[src]

Runs the script returning the resulting value. It will be run in the context in which it was created (ScriptCompiler::CompileBound or UnboundScript::BindToCurrentContext()).

Trait Implementations

impl Deref for Script[src]

type Target = Data

The resulting type after dereferencing.

Auto Trait Implementations

impl RefUnwindSafe for Script

impl Send for Script

impl Sync for Script

impl Unpin for Script

impl UnwindSafe for Script

Blanket Implementations

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

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

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

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

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

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.

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.