Trait JavaType

Source
pub trait JavaType { }
Expand description

A trait that represents Rust types that are mappable to JNI types. This trait has to be implemented for all types that need to be passed as arguments to or returned from Java functions.

THIS TRAIT SHOULD NOT BE USED MANUALLY.

This trait should only be implemented and used by generated code.

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.

Implementations on Foreign Types§

Source§

impl JavaType for bool

Make bool mappable to jboolean.

Source§

impl JavaType for char

Make char mappable to jchar.

Source§

impl JavaType for f64

Make f64 mappable to jdouble .

Source§

impl JavaType for i16

Make i16 mappable to jshort .

Source§

impl JavaType for i32

Make i32 mappable to jint .

Source§

impl JavaType for i64

Make i64 mappable to jlong .

Source§

impl JavaType for u8

Make u8 mappable to jbyte .

Source§

impl JavaType for ()

Make () mappable to () .

Source§

impl<'a, T> JavaType for &'a T
where T: JavaType + ?Sized,

Make references mappable to JNI types of their referenced types.

Implementors§

Source§

impl<'a> JavaType for Class<'a>

Make Class mappable to jobject.

Source§

impl<'a> JavaType for Object<'a>

Make Object mappable to jobject.

Source§

impl<'a> JavaType for String<'a>

Make String mappable to jobject.

Source§

impl<'a> JavaType for Throwable<'a>

Make Throwable mappable to jobject.