Struct jni::objects::JThrowable

source ·
#[repr(transparent)]
pub struct JThrowable<'local>(_);
Expand description

Lifetime’d representation of a jthrowable. Just a JObject wrapped in a new class.

Implementations§

source§

impl<'local> JThrowable<'local>

source

pub unsafe fn from_raw(raw: jthrowable) -> Self

Creates a JThrowable that wraps the given raw jthrowable

Safety

raw may be a null pointer. If raw is not a null pointer, then:

  • raw must be a valid raw JNI local reference.
  • There must not be any other JObject representing the same local reference.
  • The lifetime 'local must not outlive the local reference frame that the local reference was created in.
source

pub fn into_raw(self) -> jthrowable

Unwrap to the raw jni type.

Methods from Deref<Target = JObject<'local>>§

source

pub fn as_raw(&self) -> jobject

Returns the raw JNI pointer.

Trait Implementations§

source§

impl<'local> AsRef<JObject<'local>> for JThrowable<'local>

source§

fn as_ref(&self) -> &JObject<'local>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<'local> AsRef<JThrowable<'local>> for JThrowable<'local>

source§

fn as_ref(&self) -> &JThrowable<'local>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<'local> Default for JThrowable<'local>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'local> Deref for JThrowable<'local>

§

type Target = JObject<'local>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'local, 'str_ref> Desc<'local, JThrowable<'local>> for &'str_ref str

§

type Output = AutoLocal<'local, JThrowable<'local>>

The type that this Desc returns.
source§

fn lookup(self, env: &mut JNIEnv<'local>) -> Result<Self::Output>

Look up the concrete type from the JVM. Read more
source§

impl<'local, 'other_local, C, M> Desc<'local, JThrowable<'local>> for (C, M)where C: Desc<'local, JClass<'other_local>>, M: Into<JNIString>,

§

type Output = AutoLocal<'local, JThrowable<'local>>

The type that this Desc returns.
source§

fn lookup(self, env: &mut JNIEnv<'local>) -> Result<Self::Output>

Look up the concrete type from the JVM. Read more
source§

impl<'local> Desc<'local, JThrowable<'local>> for Exception

§

type Output = AutoLocal<'local, JThrowable<'local>>

The type that this Desc returns.
source§

fn lookup(self, env: &mut JNIEnv<'local>) -> Result<Self::Output>

Look up the concrete type from the JVM. Read more
source§

impl<'local> Desc<'local, JThrowable<'local>> for JNIString

§

type Output = AutoLocal<'local, JThrowable<'local>>

The type that this Desc returns.
source§

fn lookup(self, env: &mut JNIEnv<'local>) -> Result<Self::Output>

Look up the concrete type from the JVM. Read more
source§

impl<'local> Desc<'local, JThrowable<'local>> for String

§

type Output = AutoLocal<'local, JThrowable<'local>>

The type that this Desc returns.
source§

fn lookup(self, env: &mut JNIEnv<'local>) -> Result<Self::Output>

Look up the concrete type from the JVM. Read more
source§

impl<'local, 'obj_ref> From<&'obj_ref JObject<'local>> for &'obj_ref JThrowable<'local>

source§

fn from(other: &'obj_ref JObject<'local>) -> Self

Converts to this type from the input type.
source§

impl<'local> From<JObject<'local>> for JThrowable<'local>

source§

fn from(other: JObject<'_>) -> Self

Converts to this type from the input type.
source§

impl<'local> From<JThrowable<'local>> for JObject<'local>

source§

fn from(other: JThrowable<'_>) -> JObject<'_>

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'local> RefUnwindSafe for JThrowable<'local>

§

impl<'local> Send for JThrowable<'local>where 'local: 'static,

§

impl<'local> Sync for JThrowable<'local>where 'local: 'static,

§

impl<'local> Unpin for JThrowable<'local>

§

impl<'local> UnwindSafe for JThrowable<'local>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.