Trait Desc

Source
pub trait Desc<'a, T> {
    // Required method
    fn lookup(self, _: &JNIEnv<'a>) -> Result<T>;
}
Expand description

see https://github.com/jni-rs/jni-rs/blob/master/src/wrapper/descriptors/desc.rs

Trait for things that can be looked up through the JNI via a descriptor. This will be something like the fully-qualified class name java/lang/String or a tuple containing a class descriptor, method name, and method signature. For convenience, this is also implemented for the concrete types themselves in addition to their descriptors.

Required Methods§

Source

fn lookup(self, _: &JNIEnv<'a>) -> Result<T>

Different Look up the concrete type from the JVM.

Implementations on Foreign Types§

Source§

impl<'a> Desc<'a, JClass<'a>> for &'a str

Source§

fn lookup(self, jni: &JNIEnv<'a>) -> Result<JClass<'a>>

Source§

impl<'a> Desc<'a, JClass<'a>> for JNIString

Source§

fn lookup(self, jni: &JNIEnv<'a>) -> Result<JClass<'a>>

Source§

impl<'a> Desc<'a, JThrowable<'a>> for &'a str

Source§

fn lookup(self, jni: &JNIEnv<'a>) -> Result<JThrowable<'a>>

Source§

impl<'a> Desc<'a, JThrowable<'a>> for String

Source§

fn lookup(self, jni: &JNIEnv<'a>) -> Result<JThrowable<'a>>

Source§

impl<'a> Desc<'a, JThrowable<'a>> for Exception

Source§

fn lookup(self, jni: &JNIEnv<'a>) -> Result<JThrowable<'a>>

Source§

impl<'a> Desc<'a, JThrowable<'a>> for JNIString

Source§

fn lookup(self, jni: &JNIEnv<'a>) -> Result<JThrowable<'a>>

Source§

impl<'a, M> Desc<'a, JThrowable<'a>> for (JClass<'a>, M)
where M: Into<JNIString>,

Source§

fn lookup(self, jni: &JNIEnv<'a>) -> Result<JThrowable<'a>>

Source§

impl<'a, U> Desc<'a, JMethodID<'a>> for (JClass<'a>, U)
where U: Into<JNIString>,

Source§

fn lookup(self, jni: &JNIEnv<'a>) -> Result<JMethodID<'a>>

Source§

impl<'a, U, V> Desc<'a, JFieldID<'a>> for (JClass<'a>, U, V)
where U: Into<JNIString>, V: Into<JNIString>,

Source§

fn lookup(self, jni: &JNIEnv<'a>) -> Result<JFieldID<'a>>

Source§

impl<'a, U, V> Desc<'a, JMethodID<'a>> for (JClass<'a>, U, V)
where U: Into<JNIString>, V: Into<JNIString>,

Source§

fn lookup(self, jni: &JNIEnv<'a>) -> Result<JMethodID<'a>>

Source§

impl<'a, U, V> Desc<'a, JStaticFieldID<'a>> for (JClass<'a>, U, V)
where U: Into<JNIString>, V: Into<JNIString>,

Source§

fn lookup(self, jni: &JNIEnv<'a>) -> Result<JStaticFieldID<'a>>

Source§

impl<'a, U, V> Desc<'a, JStaticMethodID<'a>> for (JClass<'a>, U, V)
where U: Into<JNIString>, V: Into<JNIString>,

Source§

fn lookup(self, jni: &JNIEnv<'a>) -> Result<JStaticMethodID<'a>>

Implementors§

Source§

impl<'a> Desc<'a, JClass<'a>> for JObject<'a>

Source§

impl<'a, T> Desc<'a, T> for T