Struct javy::Config

source ·
pub struct Config { /* private fields */ }
Expand description

A configuration for Runtime.

These are the global configuration options to create a Runtime, and customize its behavior.

Implementations§

source§

impl Config

source

pub fn date(&mut self, enable: bool) -> &mut Self

Configures whether the JavaScript Date intrinsic will be available.

source

pub fn eval(&mut self, enable: bool) -> &mut Self

Configures whether the Eval intrinsic will be available.

source

pub fn regexp_compiler(&mut self, enable: bool) -> &mut Self

Configures whether the regular expression compiler will be available.

source

pub fn regexp(&mut self, enable: bool) -> &mut Self

Configures whether the RegExp intrinsic will be available.

source

pub fn json(&mut self, enable: bool) -> &mut Self

Configures whether the QuickJS native JSON intrinsic will be available.

source

pub fn proxy(&mut self, enable: bool) -> &mut Self

Configures whether proxy object creation will be available. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy

source

pub fn map_set(&mut self, enable: bool) -> &mut Self

Configures whether the MapSet intrinsic will be available.

source

pub fn promise(&mut self, enable: bool) -> &mut Self

Configures whether the Promise instrinsic will be available.

source

pub fn big_int(&mut self, enable: bool) -> &mut Self

Configures whether supoort for BigInt will be available.

source

pub fn big_float(&mut self, enable: bool) -> &mut Self

Configures whether support for BigFloat will be available.

source

pub fn big_decimal(&mut self, enable: bool) -> &mut Self

Configures whether supporr for BigDecimal will be available.

source

pub fn operator_overloading(&mut self, enable: bool) -> &mut Self

Configures whether operator overloading wil be supported.

source

pub fn bignum_extension(&mut self, enable: bool) -> &mut Self

Configures whether extensions to BigNum will be available.

source

pub fn text_encoding(&mut self, enable: bool) -> &mut Self

Configures whether the TextEncoding and TextDecoding intrinsics will be available. NB: This is partial implementation.

source

pub fn javy_stream_io(&mut self, enable: bool) -> &mut Self

Whether the Javy.IO intrinsic will be available. Disabled by default.

source

pub fn redirect_stdout_to_stderr(&mut self, enable: bool) -> &mut Self

Enables whether the output of console.log will be redirected to stderr.

Trait Implementations§

source§

impl Default for Config

source§

fn default() -> Self

Creates a Config with default values.

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T> ParallelSend for T