Struct jni::objects::AutoArray [−][src]
Auto-release wrapper for pointer-based generic arrays.
This wrapper is used to wrap pointers returned by GetFrom
impl.
AutoArray provides automatic array release through a call to appropriate
Release
Implementations
impl<'a, 'b, T: TypeArray> AutoArray<'a, 'b, T>
[src]
pub fn as_ptr(&self) -> *mut T
[src]
Get a reference to the wrapped pointer
pub fn commit(&self) -> Result<()>
[src]
Commits the changes to the array, if it is a copy
pub fn discard(&mut self)
[src]
Don't commit the changes to the array on release (if it is a copy).
This has no effect if the array is not a copy.
This method is useful to change the release mode of an array originally created
with ReleaseMode::CopyBack
.
pub fn is_copy(&self) -> bool
[src]
Indicates if the array is a copy or not
pub fn size(&self) -> Result<jsize>
[src]
Returns the array size
Trait Implementations
Auto Trait Implementations
impl<'a, 'b, T> RefUnwindSafe for AutoArray<'a, 'b, T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<'a, 'b, T> !Send for AutoArray<'a, 'b, T>
[src]
impl<'a, 'b, T> !Sync for AutoArray<'a, 'b, T>
[src]
impl<'a, 'b, T> Unpin for AutoArray<'a, 'b, T> where
'a: 'b,
[src]
'a: 'b,
impl<'a, 'b, T> UnwindSafe for AutoArray<'a, 'b, T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,