[−][src]Enum jni::objects::JValue
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]
fn clone(&self) -> JValue<'a>
[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> Debug for JValue<'a>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,