CharArray

Enum CharArray 

Source
pub enum CharArray {}
Expand description

A PrimitiveArray implementation.

Trait Implementations§

Source§

impl JniType for CharArray

Source§

fn static_with_jni_type<R>(callback: impl FnOnce(&CStr) -> R) -> R

Source§

impl PrimitiveArray<u16> for CharArray

Source§

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: &[jchar]) -> 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

Uses JNI GetArrayLength to get the length of the Java array.
Source§

fn get_region(self: &Ref<'_, Self>, start: usize, elements: &mut [jchar])

Uses JNI Get{Type}ArrayRegion to read the contents of the Java array within [start .. start + elements.len()]. Read more
Source§

fn set_region(self: &Ref<'_, Self>, start: usize, elements: &[jchar])

Uses JNI Set{Type}ArrayRegion to set the contents of the Java array within [start .. start + elements.len()]. Read more
Source§

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>

Uses JNI GetArrayLength + Get{Type}ArrayRegion to read the contents of the Java array within given range into a new Vec. Read more
Source§

fn as_vec(self: &Ref<'_, Self>) -> Vec<T>

Uses JNI GetArrayLength + Get{Type}ArrayRegion to read the contents of the entire Java array into a new Vec.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> AssignableTo<T> for T
where T: ReferenceType,