Config

Struct Config 

Source
pub struct Config { /* private fields */ }
Expand description

A configuration for the Javy plugin API.

Implementations§

Source§

impl Config

Source

pub fn event_loop(&mut self, enabled: bool) -> &mut Self

Whether to enable the event loop.

Methods from Deref<Target = Config>§

Source

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

Configures whether the JavaScript Date intrinsic will be available.

Source

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

Configures whether the Eval intrinsic will be available.

Source

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

Configures whether the regular expression compiler will be available.

Source

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

Configures whether the RegExp intrinsic will be available.

Source

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

Configures whether the QuickJS native JSON intrinsic will be available.

Source

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

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 Config

Configures whether the MapSet intrinsic will be available.

Source

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

Configures whether the Promise instrinsic will be available.

Source

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

Configures whether supoort for BigInt will be available.

Source

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

Configures whether support for BigFloat will be available.

Source

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

Configures whether supporr for BigDecimal will be available.

Source

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

Configures whether operator overloading wil be supported.

Source

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

Configures whether extensions to BigNum will be available.

Source

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

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 Config

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

Source

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

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

Source

pub fn gc_threshold(&mut self, bytes: usize) -> &mut Config

The number of bytes to use to trigger garbage collection. The default is usize::MAX.

Source

pub fn memory_limit(&mut self, bytes: usize) -> &mut Config

The limit on the max amount of memory the runtime will use. Default is unlimited.

Source

pub fn max_stack_size(&mut self, bytes: usize) -> &mut Config

The limit on the max size of stack the runtime will use. Default is 256 * 1024.

Source

pub fn log_stream(&mut self, stream: Box<dyn Write>) -> &mut Config

The stream to use for calls to console.log.

Source

pub fn err_stream(&mut self, stream: Box<dyn Write>) -> &mut Config

The stream to use for calls to console.error.

Trait Implementations§

Source§

impl Default for Config

Source§

fn default() -> Config

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

impl Deref for Config

Source§

type Target = Config

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for Config

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

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

Source§

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>,

Source§

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