[][src]Enum jni::objects::JValue

pub enum JValue<'a> {
    Object(JObject<'a>),
    Byte(jbyte),
    Char(jchar),
    Short(jshort),
    Int(jint),
    Long(jlong),
    Bool(jboolean),
    Float(jfloat),
    Double(jdouble),
    Void,
}

Rusty version of the JNI C jvalue enum. Used in Java method call arguments and returns.

Variants

Object(JObject<'a>)
Byte(jbyte)
Char(jchar)
Short(jshort)
Int(jint)
Long(jlong)
Bool(jboolean)
Float(jfloat)
Double(jdouble)
Void

Methods

impl<'a> JValue<'a>[src]

pub fn to_jni(self) -> jvalue[src]

Convert the enum to its jni-compatible equivalent.

pub fn type_name(&self) -> &'static str[src]

Get the type name for the enum variant.

pub fn primitive_type(&self) -> Option<Primitive>[src]

Get the primitive type for the enum variant. If it's not a primitive (i.e. an Object), returns None.

pub fn l(self) -> Result<JObject<'a>>[src]

Try to unwrap to an Object.

pub fn z(self) -> Result<bool>[src]

Try to unwrap to a boolean.

pub fn b(self) -> Result<jbyte>[src]

Try to unwrap to a byte.

pub fn c(self) -> Result<jchar>[src]

Try to unwrap to a char.

pub fn d(self) -> Result<jdouble>[src]

Try to unwrap to a double.

pub fn f(self) -> Result<jfloat>[src]

Try to unwrap to a float.

pub fn i(self) -> Result<jint>[src]

Try to unwrap to an int.

pub fn j(self) -> Result<jlong>[src]

Try to unwrap to a long.

pub fn s(self) -> Result<jshort>[src]

Try to unwrap to a short.

pub fn v(self) -> Result<()>[src]

Try to unwrap to a void.

Trait Implementations

impl<'a> From<JValue<'a>> for jvalue[src]

impl<'a> From<JObject<'a>> for JValue<'a>[src]

impl<'a> From<bool> for JValue<'a>[src]

impl<'a> From<u8> for JValue<'a>[src]

impl<'a> From<u16> for JValue<'a>[src]

impl<'a> From<i16> for JValue<'a>[src]

impl<'a> From<f32> for JValue<'a>[src]

impl<'a> From<f64> for JValue<'a>[src]

impl<'a> From<i32> for JValue<'a>[src]

impl<'a> From<i64> for JValue<'a>[src]

impl<'a> From<i8> for JValue<'a>[src]

impl<'a> From<()> for JValue<'a>[src]

impl<'a> Clone for JValue<'a>[src]

impl<'a> Copy for JValue<'a>[src]

impl<'a> Debug for JValue<'a>[src]

Auto Trait Implementations

impl<'a> !Send for JValue<'a>

impl<'a> !Sync for JValue<'a>

impl<'a> Unpin for JValue<'a>

impl<'a> UnwindSafe for JValue<'a>

impl<'a> RefUnwindSafe for JValue<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]