[][src]Struct boa::exec::Interpreter

pub struct Interpreter {
    pub realm: Realm,
    // some fields omitted
}

A Javascript intepreter

Fields

realm: Realm

realm holds both the global object and the environment

Implementations

impl Interpreter[src]

pub fn to_primitive(
    &mut self,
    input: &Value,
    preferred_type: Option<&str>
) -> Value
[src]

The abstract operation ToPrimitive takes an input argument and an optional argument PreferredType. https://tc39.es/ecma262/#sec-toprimitive

pub fn to_string(&mut self, value: &Value) -> Value[src]

to_string() converts a value into a String https://tc39.es/ecma262/#sec-tostring

pub fn to_object(&mut self, value: &Value) -> ResultValue[src]

The abstract operation ToObject converts argument to a value of type Object https://tc39.es/ecma262/#sec-toobject

pub fn value_to_rust_string(&mut self, value: &Value) -> String[src]

value_to_rust_string() converts a value into a rust heap allocated string

pub fn value_to_rust_number(&mut self, value: &Value) -> f64[src]

Trait Implementations

impl Debug for Interpreter[src]

impl Executor for Interpreter[src]

Auto Trait Implementations

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,