pub enum IntArray {}Expand description
A PrimitiveArray implementation.
Trait Implementations§
Source§impl JniType for IntArray
impl JniType for IntArray
fn static_with_jni_type<R>(callback: impl FnOnce(&CStr) -> R) -> R
Source§impl PrimitiveArray<i32> for IntArray
impl PrimitiveArray<i32> for IntArray
Source§fn new<'env>(env: Env<'env>, size: usize) -> Local<'env, Self>
fn new<'env>(env: Env<'env>, size: usize) -> Local<'env, Self>
Uses JNI
New{Type}Array to create a new Java array containing “size” elements.Source§fn new_from<'env>(env: Env<'env>, elements: &[jint]) -> Local<'env, Self>
fn new_from<'env>(env: Env<'env>, elements: &[jint]) -> Local<'env, Self>
Uses JNI
New{Type}Array + Set{Type}ArrayRegion to create a new Java array containing a copy of “elements”.Source§fn len(self: &Ref<'_, Self>) -> usize
fn len(self: &Ref<'_, Self>) -> usize
Uses JNI
GetArrayLength to get the length of the Java array.Source§fn get_region(self: &Ref<'_, Self>, start: usize, elements: &mut [jint])
fn get_region(self: &Ref<'_, Self>, start: usize, elements: &mut [jint])
Uses JNI
Get{Type}ArrayRegion to read the contents of the Java array within [start .. start + elements.len()]. Read moreSource§fn set_region(self: &Ref<'_, Self>, start: usize, elements: &[jint])
fn set_region(self: &Ref<'_, Self>, start: usize, elements: &[jint])
Uses JNI
Set{Type}ArrayRegion to set the contents of the Java array within [start .. start + elements.len()]. Read moreSource§fn is_empty(self: &Ref<'_, Self>) -> bool
fn is_empty(self: &Ref<'_, Self>) -> bool
Uses JNI
GetArrayLength to get the length of the Java array, returns true if it is 0.Source§fn get_region_as_vec(
self: &Ref<'_, Self>,
range: impl RangeBounds<usize>,
) -> Vec<T>
fn get_region_as_vec( self: &Ref<'_, Self>, range: impl RangeBounds<usize>, ) -> Vec<T>
Uses JNI
GetArrayLength + Get{Type}ArrayRegion to read the contents of the Java array within given range
into a new Vec. Read moreAuto Trait Implementations§
impl Freeze for IntArray
impl RefUnwindSafe for IntArray
impl Send for IntArray
impl Sync for IntArray
impl Unpin for IntArray
impl UnwindSafe for IntArray
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