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

    const SIG_TYPE: &'static str;

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

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

Conversion target type.

Associated Constants

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

Required methods

Perform the conversion.

Implementations on Foreign Types

Implementors