Trait JBindingType

Source
pub unsafe trait JBindingType {
    const SIGNATURE: &'static str;
    const NAME: &'static str;

    // Required methods
    unsafe fn to_jvalue(&self) -> jvalue;
    unsafe fn to_jvalue_ref<'obj_ref>(&'obj_ref self) -> JValue<'_, 'obj_ref>;
}
Expand description

this trait should only be implemented by macro, manually implement this trait will cause undefined behaviour

Required Associated Constants§

Source

const SIGNATURE: &'static str

Source

const NAME: &'static str

Required Methods§

Source

unsafe fn to_jvalue(&self) -> jvalue

Source

unsafe fn to_jvalue_ref<'obj_ref>(&'obj_ref self) -> JValue<'_, 'obj_ref>

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.

Implementors§

Source§

impl JBindingType for jboolean

Source§

const SIGNATURE: &'static str = "Z"

Source§

const NAME: &'static str = "boolean"

Source§

impl JBindingType for jbyte

Source§

const SIGNATURE: &'static str = "B"

Source§

const NAME: &'static str = "byte"

Source§

impl JBindingType for jchar

Source§

const SIGNATURE: &'static str = "C"

Source§

const NAME: &'static str = "char"

Source§

impl JBindingType for jdouble

Source§

const SIGNATURE: &'static str = "D"

Source§

const NAME: &'static str = "double"

Source§

impl JBindingType for jfloat

Source§

const SIGNATURE: &'static str = "F"

Source§

const NAME: &'static str = "float"

Source§

impl JBindingType for jint

Source§

const SIGNATURE: &'static str = "I"

Source§

const NAME: &'static str = "int"

Source§

impl JBindingType for jlong

Source§

const SIGNATURE: &'static str = "J"

Source§

const NAME: &'static str = "long"

Source§

impl JBindingType for jshort

Source§

const SIGNATURE: &'static str = "S"

Source§

const NAME: &'static str = "short"