Trait IntoJava

Source
pub trait IntoJava<'j> {
    type Ret;

    // Required method
    fn into_java(self, _: &mut JNIEnv<'j>) -> Result<Self::Ret, Error>;
}
Expand description

Specifies how a Rust type should be converted into a Java primitive.

Required Associated Types§

Source

type Ret

The JNI type representing the output.

Required Methods§

Source

fn into_java(self, _: &mut JNIEnv<'j>) -> Result<Self::Ret, Error>

Attempts to convert this Rust object into a Java primitive.

Implementations on Foreign Types§

Source§

impl<'j> IntoJava<'j> for bool

Source§

type Ret = u8

Source§

fn into_java(self, _: &mut JNIEnv<'_>) -> Result<Self::Ret, Error>

Source§

impl<'j> IntoJava<'j> for f32

Source§

type Ret = f32

Source§

fn into_java(self, _: &mut JNIEnv<'j>) -> Result<Self::Ret, Error>

Source§

impl<'j> IntoJava<'j> for f64

Source§

type Ret = f64

Source§

fn into_java(self, _: &mut JNIEnv<'j>) -> Result<Self::Ret, Error>

Source§

impl<'j> IntoJava<'j> for i8

Source§

type Ret = i8

Source§

fn into_java(self, _: &mut JNIEnv<'j>) -> Result<Self::Ret, Error>

Source§

impl<'j> IntoJava<'j> for i16

Source§

type Ret = i16

Source§

fn into_java(self, _: &mut JNIEnv<'j>) -> Result<Self::Ret, Error>

Source§

impl<'j> IntoJava<'j> for i32

Source§

type Ret = i32

Source§

fn into_java(self, _: &mut JNIEnv<'j>) -> Result<Self::Ret, Error>

Source§

impl<'j> IntoJava<'j> for i64

Source§

type Ret = i64

Source§

fn into_java(self, _: &mut JNIEnv<'j>) -> Result<Self::Ret, Error>

Source§

impl<'j> IntoJava<'j> for ()

Source§

type Ret = ()

Source§

fn into_java(self, _: &mut JNIEnv<'j>) -> Result<Self::Ret, Error>

Implementors§

Source§

impl<'j, X: IntoJavaObject<'j>> IntoJava<'j> for X