Crate jsi

Source

Re-exports§

pub use jsi_sys as sys;

Modules§

de
ser

Macros§

js_error
Creates a JavaScript Error object with the given string as the message.

Structs§

CallInvoker
Used to run JavaScript functions in a given runtime from Rust. Required when trying to call a JavaScript function from a thread other than the JS thread.
JsiArray
A JavaScript Array. Can be used to share large buffers of data with a React Native application.
JsiArrayBuffer
A JavaScript ArrayBuffer. Can be used to share large buffers of data with a React Native application.
JsiArrayIter
JsiDeserializer
Desrializes objects from JavaScript via JSI. Useful for transferring Rust structures and objects from serde_json from JavaScript.
JsiFn
A JavaScript function.
JsiObject
A JavaScript Object.
JsiSerializer
Serializes objects into JavaScript via JSI. Useful for transferring Rust structures and objects from serde_json into JavaScript.
JsiString
A JavaScript String
JsiSymbol
A JavaScript Symbol
JsiValue
OwnedJsiHostObject
An owned host object
OwnedJsiUserHostObject
A host object that is implemented in Rust using a UserHostObject trait object. Start with this if you want to implement a host object.
PropName
A PropName, which is used to retrieve properties from Objects.
RuntimeHandle
SharedJsiHostObject
A shared reference to a host object
SharedJsiUserHostObject
A host object that is implemented in Rust using a UserHostObject trait object.

Enums§

JsiValueKind

Traits§

AsValue
Conversion trait to and from JsiValue. This is needed instead of the normal Into trait b/c creating a JsiValue requires a RuntimeHandle. Note that using this trait will create a copy of the data being converted (ex.: using as_value() on a JsiObject will create a value that contains a copy of that object).
AsyncUserHostObject
Support trait to allow implementation of async functions via attribute macro.
DeserializeValue
FromObject
FromValue
IntoObject
IntoValue
Conversion trait to and from JsiValue. This is needed instead of the normal Into trait b/c creating a JsiValue requires a RuntimeHandle.
RuntimeClone
RuntimeDisplay
RuntimeEq
SerializeValue
UserHostObject
Helper trait for implementing a host object in Rust

Functions§

create_promise
init

Type Aliases§

CallInvokerCallback
JsTaskCallback
UserHostFunction

Attribute Macros§

host_object
A macro that makes it easy to define functions and properies on host objects.