pub trait ResultExt<T> {
// Required methods
fn unwrap_java(self, e: &mut Env<'_>) -> T;
fn to_throwable(self, e: &mut Env<'_>) -> Result<T, Throwable>;
}Expand description
[toad_jni::errors::Result] interop helpers
Required Methods§
Sourcefn unwrap_java(self, e: &mut Env<'_>) -> T
fn unwrap_java(self, e: &mut Env<'_>) -> T
If a java exception occurred, toString it and panic
Sourcefn to_throwable(self, e: &mut Env<'_>) -> Result<T, Throwable>
fn to_throwable(self, e: &mut Env<'_>) -> Result<T, Throwable>
If a java exception occurred, convert to java::lang::Throwable
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".