pub trait IntoJava<'borrow, 'env: 'borrow> {
type JavaType: AsJValue<'env>;
const JNI_SIGNATURE: &'static str;
// Required method
fn into_java(self, env: &'borrow JnixEnv<'env>) -> Self::JavaType;
// Provided method
fn jni_signature(&self) -> &'static str { ... }
}
Expand description
Conversion from a type into its Java representation.
A type that implements this trait has an equivalent Java representation.
Required Associated Constants§
Sourceconst JNI_SIGNATURE: &'static str
const JNI_SIGNATURE: &'static str
The JNI signature of the Java type.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn jni_signature(&self) -> &'static str
fn jni_signature(&self) -> &'static str
Returns the JNI signature of the Java type.
This is a helper method to obtain the JNI_SIGNATURE
from a value without knowing its
exact type name.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.