Trait robusta_jni::convert::safe::TryIntoJavaValue[][src]

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

    const SIG_TYPE: &'static str;

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

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

This is the default trait used when converting values from Rust to Java.

Notes on derive macro

The same notes on TryFromJavaValue apply.

Note that when autoderiving TryIntoJavaValue for T, an implementation for all of T, &T and &mut T is generated (for ergonomics).

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 try_into(self, env: &JNIEnv<'env>) -> Result<Self::Target>[src]

Perform the conversion.

Loading content...

Implementations on Foreign Types

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

type Target = jstring

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

type Target = jboolean

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

type Target = jchar

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

type Target = jbooleanArray

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

type Target = jobject

Loading content...

Implementors

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

type Target = T

Loading content...