Module prelude

Source
Expand description

A group of often used types.

Re-exports§

pub use crate::context::Ctx;
pub use crate::JsLifetime;

Structs§

Asyncfutures
Helper type for creating a function from a closure which returns a future.
Coerced
The wrapper for values to force coercion
Exhaustive
Helper type for making an parameter set exhaustive.
Flat
A type to flatten tuples into another tuple.
Func
Helper type to implement IntoJsFunc for closure by constraining arguments.
FuncArg
helper type for retrieving function object on which a function is called..
List
A helper type for turning a tuple into a JavaScript array. Implements IntoJs and FromJs for tuples of various lengths
MutFn
Helper type for creating a function from a closure which implements FnMut
OnceFn
Helper type for creating a function from a closure which implements FnMut
Opt
Helper type for optional parameters.
Promisefutures
A JavaScript promise.
Promisedfutures
Wrapper for futures to convert to JS promises
Rest
Helper type for rest and spread arguments.
This
helper type for working setting and retrieving this values.

Traits§

CatchResultExt
Extension trait to easily turn results with Error into results with CaughtError
FromAtom
Trait for converting values from atoms.
FromIteratorJs
The Rust’s FromIterator trait to use with Ctx
FromJs
For converting JavaScript values to Rust values
IntoArg
A trait for converting values into arguments.
IntoArgs
A trait for converting a tuple of values into a list arguments.
IntoAtom
Trait for converting values to atoms.
IntoJs
For converting Rust values to JavaScript values
IteratorJs
The Rust’s Iterator trait extension which works with Ctx
ThrowResultExt
Extension trait to easily turn results with CaughtError into results with Error