pub struct Return<'env, T: ReferenceType> { /* private fields */ }Expand description
FFI: Use Return<java::lang::Object> instead of jobject. This represents a (null?) JNI function call return value.
Unlike most Java reference types from this library, this can be null. Recommended constructors are crate::Local::into_return and Return::null.
FFI safe where a jobject is safe, assuming you match your types correctly.
Implementations§
Source§impl<'env, T: ReferenceType> Return<'env, T>
impl<'env, T: ReferenceType> Return<'env, T>
Sourcepub unsafe fn from_raw(object: jobject) -> Self
pub unsafe fn from_raw(object: jobject) -> Self
Wraps a raw JNI reference.
§Safety
- If
objectis non-null, it must be a JNI local(?) reference to an instance of typeT; objectmust keep valid for'envlifetime; it is not owned byLocalor any other wrapper that deletes the reference onDropbefore the JNI native method call returns.
Trait Implementations§
Auto Trait Implementations§
impl<'env, T> Freeze for Return<'env, T>
impl<'env, T> RefUnwindSafe for Return<'env, T>where
T: RefUnwindSafe,
impl<'env, T> !Send for Return<'env, T>
impl<'env, T> !Sync for Return<'env, T>
impl<'env, T> Unpin for Return<'env, T>
impl<'env, T> UnwindSafe for Return<'env, T>where
T: RefUnwindSafe,
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