pub struct Config { /* private fields */ }
Expand description
A configuration for the Javy plugin API.
Implementations§
Methods from Deref<Target = Config>§
Sourcepub fn date(&mut self, enable: bool) -> &mut Config
pub fn date(&mut self, enable: bool) -> &mut Config
Configures whether the JavaScript Date
intrinsic will be available.
Sourcepub fn eval(&mut self, enable: bool) -> &mut Config
pub fn eval(&mut self, enable: bool) -> &mut Config
Configures whether the Eval
intrinsic will be available.
Sourcepub fn regexp_compiler(&mut self, enable: bool) -> &mut Config
pub fn regexp_compiler(&mut self, enable: bool) -> &mut Config
Configures whether the regular expression compiler will be available.
Sourcepub fn regexp(&mut self, enable: bool) -> &mut Config
pub fn regexp(&mut self, enable: bool) -> &mut Config
Configures whether the RegExp
intrinsic will be available.
Sourcepub fn json(&mut self, enable: bool) -> &mut Config
pub fn json(&mut self, enable: bool) -> &mut Config
Configures whether the QuickJS native JSON intrinsic will be available.
Sourcepub fn proxy(&mut self, enable: bool) -> &mut Config
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
Sourcepub fn map_set(&mut self, enable: bool) -> &mut Config
pub fn map_set(&mut self, enable: bool) -> &mut Config
Configures whether the MapSet
intrinsic will be available.
Sourcepub fn promise(&mut self, enable: bool) -> &mut Config
pub fn promise(&mut self, enable: bool) -> &mut Config
Configures whether the Promise
instrinsic will be available.
Sourcepub fn big_int(&mut self, enable: bool) -> &mut Config
pub fn big_int(&mut self, enable: bool) -> &mut Config
Configures whether supoort for BigInt
will be available.
Sourcepub fn big_float(&mut self, enable: bool) -> &mut Config
pub fn big_float(&mut self, enable: bool) -> &mut Config
Configures whether support for BigFloat
will be available.
Sourcepub fn big_decimal(&mut self, enable: bool) -> &mut Config
pub fn big_decimal(&mut self, enable: bool) -> &mut Config
Configures whether supporr for BigDecimal
will be available.
Sourcepub fn operator_overloading(&mut self, enable: bool) -> &mut Config
pub fn operator_overloading(&mut self, enable: bool) -> &mut Config
Configures whether operator overloading wil be supported.
Sourcepub fn bignum_extension(&mut self, enable: bool) -> &mut Config
pub fn bignum_extension(&mut self, enable: bool) -> &mut Config
Configures whether extensions to BigNum
will be available.
Sourcepub fn text_encoding(&mut self, enable: bool) -> &mut Config
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.
Sourcepub fn javy_stream_io(&mut self, enable: bool) -> &mut Config
pub fn javy_stream_io(&mut self, enable: bool) -> &mut Config
Whether the Javy.IO
intrinsic will be available.
Disabled by default.
Sourcepub fn redirect_stdout_to_stderr(&mut self, enable: bool) -> &mut Config
pub fn redirect_stdout_to_stderr(&mut self, enable: bool) -> &mut Config
Enables whether the output of console.log will be redirected to
stderr
.
Sourcepub fn gc_threshold(&mut self, bytes: usize) -> &mut Config
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.
Sourcepub fn memory_limit(&mut self, bytes: usize) -> &mut Config
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.
Sourcepub fn max_stack_size(&mut self, bytes: usize) -> &mut Config
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.
Sourcepub fn log_stream(&mut self, stream: Box<dyn Write>) -> &mut Config
pub fn log_stream(&mut self, stream: Box<dyn Write>) -> &mut Config
The stream to use for calls to console.log
.
Sourcepub fn err_stream(&mut self, stream: Box<dyn Write>) -> &mut Config
pub fn err_stream(&mut self, stream: Box<dyn Write>) -> &mut Config
The stream to use for calls to console.error
.