pub trait Signature {
    const SIG_TYPE: &'static str;
}
Expand description

This trait provides type signatures for types. It is necessary to support conversions to/from Java types.

While you can implement this trait manually, you should probably use the derive macro.

The derive macro requires a #[package()] attribute on implementing structs (most likely you already have that).

Required Associated Constants§

source

const SIG_TYPE: &'static str

Java type signature for the implementing type.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Signature for bool

source§

const SIG_TYPE: &'static str = <jboolean as Signature>::SIG_TYPE

source§

impl Signature for char

source§

const SIG_TYPE: &'static str = <jchar as Signature>::SIG_TYPE

source§

impl Signature for ()

source§

const SIG_TYPE: &'static str = "V"

source§

impl Signature for Box<[bool]>

source§

const SIG_TYPE: &'static str = "[Z"

source§

impl Signature for Box<[u8]>

source§

const SIG_TYPE: &'static str = "[B"

source§

impl Signature for String

source§

const SIG_TYPE: &'static str = "Ljava/lang/String;"

source§

impl Signature for jboolean

source§

const SIG_TYPE: &'static str = "Z"

source§

impl Signature for jbyte

source§

const SIG_TYPE: &'static str = "B"

source§

impl Signature for jchar

source§

const SIG_TYPE: &'static str = "C"

source§

impl Signature for jdouble

source§

const SIG_TYPE: &'static str = "D"

source§

impl Signature for jfloat

source§

const SIG_TYPE: &'static str = "F"

source§

impl Signature for jint

source§

const SIG_TYPE: &'static str = "I"

source§

impl Signature for jlong

source§

const SIG_TYPE: &'static str = "J"

source§

impl Signature for jshort

source§

const SIG_TYPE: &'static str = "S"

source§

impl<'env> Signature for JObject<'env>

source§

const SIG_TYPE: &'static str = "Ljava/lang/Object;"

source§

impl<'env> Signature for JString<'env>

source§

const SIG_TYPE: &'static str = "Ljava/lang/String;"

source§

impl<T> Signature for Vec<T>

source§

const SIG_TYPE: &'static str = "Ljava/util/ArrayList;"

source§

impl<T: Signature> Signature for Result<T>

source§

const SIG_TYPE: &'static str = <T as Signature>::SIG_TYPE

Implementors§

source§

impl<'env: 'borrow, 'borrow, T> Signature for Field<'env, 'borrow, T>where T: Signature,

source§

const SIG_TYPE: &'static str = <T as Signature>::SIG_TYPE