pub trait Array<'a, T, J> {
// Required methods
fn new(env: &'a Env<'a>, length: usize) -> Self;
fn from(env: &'a Env<'a>, array: J) -> Self;
fn length(&self) -> usize;
fn get(&self, index: usize) -> Result<T>;
fn set(&self, index: usize, value: T) -> Result<()>;
}
Expand description
A trait for wrapped JNI arrays
Required Methods§
sourcefn new(env: &'a Env<'a>, length: usize) -> Self
fn new(env: &'a Env<'a>, length: usize) -> Self
Create a new array with the given length
Arguments
env
- The environmentlength
- The length of the array