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