Trait robusta_jni::convert::unchecked::FromJavaValue[][src]

pub trait FromJavaValue<'env: 'borrow, 'borrow>: Signature {
    type Source: JavaValue<'env>;

    const SIG_TYPE: &'static str;

    fn from(s: Self::Source, env: &'borrow JNIEnv<'env>) -> Self;
}

Conversion trait from Java values to Rust values, analogous to From. Used when converting types that are input to JNI-available functions.

Notes on derive macro

The same notes on TryFromJavaValue apply.

Associated Types

type Source: JavaValue<'env>[src]

Conversion source type.

Loading content...

Associated Constants

const SIG_TYPE: &'static str[src]

Signature of the target type. By default, use the one defined on the Signature trait for the implementing type.

Loading content...

Required methods

fn from(s: Self::Source, env: &'borrow JNIEnv<'env>) -> Self[src]

Perform the conversion.

Loading content...

Implementations on Foreign Types

impl<'env: 'borrow, 'borrow> FromJavaValue<'env, 'borrow> for String[src]

type Source = JString<'env>

impl<'env: 'borrow, 'borrow> FromJavaValue<'env, 'borrow> for bool[src]

type Source = jboolean

impl<'env: 'borrow, 'borrow> FromJavaValue<'env, 'borrow> for char[src]

type Source = jchar

impl<'env: 'borrow, 'borrow> FromJavaValue<'env, 'borrow> for Box<[bool]>[src]

type Source = jbooleanArray

impl<'env: 'borrow, 'borrow, T, U> FromJavaValue<'env, 'borrow> for Vec<T> where
    T: FromJavaValue<'env, 'borrow, Source = U>,
    U: JavaValue<'env>, 
[src]

type Source = JObject<'env>

Loading content...

Implementors

impl<'env: 'borrow, 'borrow, T> FromJavaValue<'env, 'borrow> for T where
    T: JavaValue<'env> + Signature
[src]

type Source = T

Loading content...