[][src]Module neon::prelude

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

Re-exports

pub use handle::Handle;
pub use types::Value;
pub use types::JsValue;
pub use types::JsUndefined;
pub use types::JsNull;
pub use types::JsBoolean;
pub use types::JsString;
pub use types::JsNumber;
pub use types::JsObject;
pub use types::JsArray;
pub use types::JsFunction;
pub use borrow::Borrow;
pub use borrow::BorrowMut;
pub use context::CallKind;
pub use context::Context;
pub use context::ModuleContext;
pub use context::ExecuteContext;
pub use context::ComputeContext;
pub use context::CallContext;
pub use context::FunctionContext;
pub use context::MethodContext;
pub use context::TaskContext;
pub use result::NeonResult;
pub use result::JsResult;
pub use result::JsResultExt;
pub use task::Task;
pub use crate::register_module;
pub use crate::declare_types;

Structs

BinaryData

A reference to the internal backing buffer data of a Buffer or ArrayBuffer object, which can be accessed via the Borrow and BorrowMut traits.

EventQueue

Queue for scheduling Rust closures to execute on tge JavaScript main thread

EventQueueError

Error indicating that a closure was unable to be scheduled to execute on the event queue

JsArrayBuffer

The standard JS ArrayBuffer type.

JsBox

A smart pointer for Rust data managed by the JavaScript engine.

JsBuffer

The Node Buffer type.

JsError

A JS Error object.

Root

Root<T> holds a reference to a JavaScript object and prevents it from being garbage collected. Root<T> may be sent across threads, but the referenced objected may only be accessed on the JavaScript thread that created it.

Traits

Class

The trait implemented by Neon classes.

Finalize

Finalize is executed on the main JavaScript thread and executed immediately before garbage collection. Values contained by a JsBox must implement Finalize.

Object

The trait of all object types.