Skip to main content

Module prelude

Module prelude 

Source
Expand description

A convenience module that re-exports the most commonly-used Boa APIs

Re-exports§

pub use crate::bigint::JsBigInt;
pub use crate::context::Context;
pub use crate::error::EngineError;
pub use crate::error::JsError;
pub use crate::error::JsNativeError;
pub use crate::error::JsNativeErrorKind;
pub use crate::error::RuntimeLimitError;
pub use crate::interop::IntoJsFunctionCopied;
pub use crate::interop::UnsafeIntoJsFunction;
pub use crate::module::IntoJsModule;
pub use crate::module::Module;
pub use crate::native_function::NativeFunction;
pub use crate::object::JsData;
pub use crate::object::JsObject;
pub use crate::object::NativeObject;
pub use crate::script::Script;
pub use crate::symbol::JsSymbol;
pub use crate::value::JsValue;
pub use crate::value::JsVariant;

Macros§

js_object
The js_value! macro creates a JsValue instance based on a JSON-like DSL.
js_str
Convert a utf8 string literal to a JsString
js_value
Create a JsObject object from a simpler DSL that resembles JSON.

Structs§

HostDefined
This represents a ECMAScript specification [HostDefined] field.
JsStr
This is equivalent to Rust’s &str.
JsString
A Latin1 or UTF-16–encoded, reference counted, immutable string.
Source
A source of ECMAScript code.

Traits§

Finalize
Substitute for the Drop trait for garbage collected types.
Trace
The Trace trait, which needs to be implemented on garbage-collected objects.

Derive Macros§

Finalize
Derive the Finalize trait.
JsData
Derive the JsData trait.
Trace
Derive the Trace trait.