[−][src]Struct boa::exec::Interpreter
A Javascript intepreter
Fields
realm: Realm
realm holds both the global object and the environment
Implementations
impl Interpreter
[src]
pub fn construct_range_error<M>(&mut self, message: M) -> Value where
M: Into<String>,
[src]
M: Into<String>,
Constructs a RangeError
with the specified message.
pub fn throw_range_error<M>(&mut self, message: M) -> ResultValue where
M: Into<String>,
[src]
M: Into<String>,
Throws a RangeError
with the specified message.
pub fn construct_type_error<M>(&mut self, message: M) -> Value where
M: Into<String>,
[src]
M: Into<String>,
Constructs a TypeError
with the specified message.
pub fn throw_type_error<M>(&mut self, message: M) -> ResultValue where
M: Into<String>,
[src]
M: Into<String>,
Throws a TypeError
with the specified message.
pub fn construct_reference_error<M>(&mut self, message: M) -> Value where
M: Into<String>,
[src]
M: Into<String>,
Constructs a ReferenceError
with the specified message.
pub fn throw_reference_error<M>(&mut self, message: M) -> ResultValue where
M: Into<String>,
[src]
M: Into<String>,
Throws a ReferenceError
with the specified message.
impl Interpreter
[src]
pub fn new(realm: Realm) -> Self
[src]
Creates a new interpreter.
pub fn to_string(&mut self, value: &Value) -> Result<RcString, Value>
[src]
Converts a value into a rust heap allocated string.
pub fn to_bigint(&mut self, value: &Value) -> Result<RcBigInt, Value>
[src]
Helper function.
pub fn to_index(&mut self, value: &Value) -> Result<usize, Value>
[src]
Converts a value to a non-negative integer if it is a valid integer index value.
See: https://tc39.es/ecma262/#sec-toindex
pub fn to_integer(&mut self, value: &Value) -> Result<i64, Value>
[src]
Converts a value to an integral 64 bit signed integer.
See: https://tc39.es/ecma262/#sec-tointeger
pub fn to_number(&mut self, value: &Value) -> Result<f64, Value>
[src]
Converts a value to a double precision floating point.
See: https://tc39.es/ecma262/#sec-tonumber
pub fn to_numeric(&mut self, value: &Value) -> ResultValue
[src]
It returns value converted to a numeric value of type Number or BigInt.
See: https://tc39.es/ecma262/#sec-tonumeric
pub fn require_object_coercible<'a>(
&mut self,
value: &'a Value
) -> Result<&'a Value, Value>
[src]
&mut self,
value: &'a Value
) -> Result<&'a Value, Value>
Check if the Value
can be converted to an Object
The abstract operation RequireObjectCoercible
takes argument argument.
It throws an error if argument is a value that cannot be converted to an Object using ToObject
.
It is defined by Table 15
More information:
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Interpreter
impl !Send for Interpreter
impl !Sync for Interpreter
impl Unpin for Interpreter
impl !UnwindSafe for Interpreter
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,