Trait FromValue

Source
pub trait FromValue: Sized {
    // Required method
    fn signature() -> SignatureComp;

    // Provided methods
    fn from_object(value: GlobalRef, env: &mut JNIEnv<'_>) -> JResult<Self> { ... }
    fn from_value(value: JValue<'_, '_>) -> JResult<Self> { ... }
    fn from_null() -> JResult<Self> { ... }
}

Required Methods§

Provided Methods§

Source

fn from_object(value: GlobalRef, env: &mut JNIEnv<'_>) -> JResult<Self>

Source

fn from_value(value: JValue<'_, '_>) -> JResult<Self>

Source

fn from_null() -> JResult<Self>

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 FromValue for bool

Source§

impl FromValue for ()

Source§

impl FromValue for String

Source§

impl FromValue for Vec<u8>

Source§

impl<T: FromValue> FromValue for Option<T>

Source§

fn signature() -> SignatureComp

Source§

fn from_null() -> JResult<Self>

Source§

fn from_object(value: GlobalRef, env: &mut JNIEnv<'_>) -> JResult<Self>

Source§

fn from_value(value: JValue<'_, '_>) -> JResult<Self>

Implementors§