Enum jni::objects::JValue
[−]
[src]
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]
fn to_jni(self) -> jvalue
Convert the enum to its jni-compatible equivalent.
fn type_name(&self) -> &'static str
Get the type name for the enum variant.
fn primitive_type(&self) -> Option<Primitive>
Get the primitive type for the enum variant. If it's not a primitive (i.e. an Object), returns None.
fn l(self) -> Result<JObject<'a>>
Try to unwrap to an Object.
fn z(self) -> Result<bool>
Try to unwrap to a boolean.
fn b(self) -> Result<jbyte>
Try to unwrap to a byte.
fn c(self) -> Result<jchar>
Try to unwrap to a char.
fn d(self) -> Result<jdouble>
Try to unwrap to a double.
fn f(self) -> Result<jfloat>
Try to unwrap to a float.
fn i(self) -> Result<jint>
Try to unwrap to an int.
fn j(self) -> Result<jlong>
Try to unwrap to a long.
fn s(self) -> Result<jshort>
Try to unwrap to a short.
fn v(self) -> Result<()>
Try to unwrap to a void.
Trait Implementations
impl<'a> Clone for JValue<'a>
[src]
fn clone(&self) -> JValue<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more