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

pub trait IntoJavaValue<'env>: Signature {
    type Target: JavaValue<'env>;

    const SIG_TYPE: &'static str;

    fn into(self, env: &JNIEnv<'env>) -> Self::Target;
}

Conversion trait from Rust values to Java values, analogous to Into. Used when converting types returned from JNI-available functions.

The usage of this trait in the generated code can be enabled with the #[call_type(unchecked)] attribute on a per-method basis.

When using this trait the conversion is assumed to be infallible. Should a conversion fail, a panic will be raised.

Notes on the derive macro

The same notes on TryIntoJavaValue apply.

Associated Types

type Target: JavaValue<'env>[src]

Conversion target type.

Loading content...

Associated Constants

const SIG_TYPE: &'static str[src]

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

Loading content...

Required methods

fn into(self, env: &JNIEnv<'env>) -> Self::Target[src]

Perform the conversion.

Loading content...

Implementations on Foreign Types

impl<'env> IntoJavaValue<'env> for String[src]

type Target = jstring

impl<'env> IntoJavaValue<'env> for bool[src]

type Target = jboolean

impl<'env> IntoJavaValue<'env> for char[src]

type Target = jchar

impl<'env> IntoJavaValue<'env> for Box<[bool]>[src]

type Target = jbooleanArray

impl<'env, T> IntoJavaValue<'env> for Vec<T> where
    T: IntoJavaValue<'env>, 
[src]

type Target = jobject

Loading content...

Implementors

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

type Target = T

Loading content...