pub struct Arg<T: ReferenceType> { /* private fields */ }Expand description
FFI: Use Arg<java::lang::Object> instead of jobject. This represents a (null?) function argument.
Unlike most Java reference types from this library, this can be null.
FFI safe where a jobject is safe, assuming you match your types correctly. Using the wrong type may result in
soundness issues, but at least on Android mostly seems to just result in JNI aborting execution for the current
process when calling methods on an instance of the wrong type.
Implementations§
Source§impl<T: ReferenceType> Arg<T>
impl<T: ReferenceType> Arg<T>
Sourcepub unsafe fn from_raw(object: jobject) -> Self
pub unsafe fn from_raw(object: jobject) -> Self
§Safety
unsafe: There’s no guarantee the jobject being passed is valid or null, nor any means of checking it.
Sourcepub unsafe fn into_local<'env>(self, env: Env<'env>) -> Option<Local<'env, T>>
pub unsafe fn into_local<'env>(self, env: Env<'env>) -> Option<Local<'env, T>>
Sourcepub unsafe fn into_global(self, env: Env<'_>) -> Option<Global<T>>
pub unsafe fn into_global(self, env: Env<'_>) -> Option<Global<T>>
Auto Trait Implementations§
impl<T> Freeze for Arg<T>
impl<T> RefUnwindSafe for Arg<T>where
T: RefUnwindSafe,
impl<T> !Send for Arg<T>
impl<T> !Sync for Arg<T>
impl<T> Unpin for Arg<T>where
T: Unpin,
impl<T> UnwindSafe for Arg<T>where
T: UnwindSafe,
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