[−][src]Struct jni_glue::Argument
FFI: Use Argument<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.
Methods
impl<Class: AsValidJObjectAndEnv> Argument<Class>
[src]
pub unsafe fn from_unchecked(object: jobject) -> Self
[src]
unsafe: There's no guarantee the jobject being passed is valid or null, nor any means of checking it.
pub unsafe fn with_unchecked<'env>(
&'env self,
env: &'env Env
) -> Option<ArgumentRef<'env, Class>>
[src]
&'env self,
env: &'env Env
) -> Option<ArgumentRef<'env, Class>>
unsafe: This assumes the argument belongs to the given Env/VM, which is technically unsound. However, the intended use case of immediately converting any Argument s into ArgumentRef s at the start of a JNI callback, where Java directly invoked your function with an Env + arguments, is sound.
Auto Trait Implementations
impl<Class> RefUnwindSafe for Argument<Class> where
Class: RefUnwindSafe,
Class: RefUnwindSafe,
impl<Class> !Send for Argument<Class>
impl<Class> !Sync for Argument<Class>
impl<Class> Unpin for Argument<Class> where
Class: Unpin,
Class: Unpin,
impl<Class> UnwindSafe for Argument<Class> where
Class: UnwindSafe,
Class: UnwindSafe,
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,
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.
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>,