pub struct JSRuntime { /* private fields */ }Expand description
Wrapper around facebook::jsi::Runtime providing a safe Rust API
Implementations§
Source§impl JSRuntime
impl JSRuntime
pub unsafe fn from_raw(ptr: *mut JSIRuntime) -> Self
pub fn create_undefined() -> JSValue
pub fn create_null() -> JSValue
pub fn create_bool(value: bool) -> JSValue
pub fn create_number(value: f64) -> JSValue
pub fn create_string(&mut self, data: &str) -> JSString
pub fn create_object(&mut self) -> JSObject
pub fn create_array_empty(&mut self) -> JSArray
pub fn create_array(&mut self, length: usize) -> JSArray
pub fn create_prop_name_id(&mut self, name: &str) -> JSPropNameID
pub fn create_bigint<T: IntoJSIBigInt>(&mut self, value: T) -> JSBigInt
Trait Implementations§
Auto Trait Implementations§
impl !Sync for JSRuntime
impl Forget for JSRuntime
impl Freeze for JSRuntime
impl RefUnwindSafe for JSRuntime
impl Unpin for JSRuntime
impl UnsafeUnpin for JSRuntime
impl UnwindSafe for JSRuntime
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more