Struct jni::objects::JPrimitiveArray
source · #[repr(transparent)]pub struct JPrimitiveArray<'local, T: TypeArray> { /* private fields */ }
Expand description
Implementations§
source§impl<'local, T: TypeArray> JPrimitiveArray<'local, T>
impl<'local, T: TypeArray> JPrimitiveArray<'local, T>
sourcepub unsafe fn from_raw(raw: jarray) -> Self
pub unsafe fn from_raw(raw: jarray) -> Self
Creates a JPrimitiveArray
that wraps the given raw
jarray
Safety
raw
may be a null pointer. If raw
is not a null pointer, then:
raw
must be a valid raw JNI local reference.- There must not be any other
JObject
representing the same local reference. - The lifetime
'local
must not outlive the local reference frame that the local reference was created in.
Methods from Deref<Target = JObject<'local>>§
Trait Implementations§
source§impl<'local, T: TypeArray> AsJArrayRaw<'local> for JPrimitiveArray<'local, T>
impl<'local, T: TypeArray> AsJArrayRaw<'local> for JPrimitiveArray<'local, T>
source§fn as_jarray_raw(&self) -> jarray
fn as_jarray_raw(&self) -> jarray
Returns the raw JNI pointer as a
jarray
source§impl<'local, T: TypeArray> AsMut<JPrimitiveArray<'local, T>> for JPrimitiveArray<'local, T>
impl<'local, T: TypeArray> AsMut<JPrimitiveArray<'local, T>> for JPrimitiveArray<'local, T>
source§fn as_mut(&mut self) -> &mut JPrimitiveArray<'local, T>
fn as_mut(&mut self) -> &mut JPrimitiveArray<'local, T>
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl<'local, T: TypeArray> AsRef<JPrimitiveArray<'local, T>> for JPrimitiveArray<'local, T>
impl<'local, T: TypeArray> AsRef<JPrimitiveArray<'local, T>> for JPrimitiveArray<'local, T>
source§fn as_ref(&self) -> &JPrimitiveArray<'local, T>
fn as_ref(&self) -> &JPrimitiveArray<'local, T>
Converts this type into a shared reference of the (usually inferred) input type.
source§impl<'local, T: TypeArray> Default for JPrimitiveArray<'local, T>
impl<'local, T: TypeArray> Default for JPrimitiveArray<'local, T>
source§impl<'local, T: TypeArray> Deref for JPrimitiveArray<'local, T>
impl<'local, T: TypeArray> Deref for JPrimitiveArray<'local, T>
source§impl<'local, 'obj_ref, T: TypeArray> From<&'obj_ref JObject<'local>> for &'obj_ref JPrimitiveArray<'local, T>
impl<'local, 'obj_ref, T: TypeArray> From<&'obj_ref JObject<'local>> for &'obj_ref JPrimitiveArray<'local, T>
This conversion assumes that the JObject
is a pointer to a class object.