pub struct JSArray { /* private fields */ }Expand description
Wrapper around facebook::jsi::Array providing a safe Rust API
Implementations§
Source§impl JSArray
impl JSArray
Sourcepub fn new(runtime: &mut JSRuntime, length: usize) -> Self
pub fn new(runtime: &mut JSRuntime, length: usize) -> Self
Create a new JavaScript array with the specified length
pub fn get(&self, runtime: &mut JSRuntime, index: usize) -> JSValue
pub fn set( &self, runtime: &mut JSRuntime, index: usize, value: &JSValue, ) -> Result<(), String>
pub fn len(&self, runtime: &mut JSRuntime) -> usize
pub fn is_empty(&self, runtime: &mut JSRuntime) -> bool
Auto Trait Implementations§
impl !Send for JSArray
impl !Sync for JSArray
impl Forget for JSArray
impl Freeze for JSArray
impl RefUnwindSafe for JSArray
impl Unpin for JSArray
impl UnsafeUnpin for JSArray
impl UnwindSafe for JSArray
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