#![feature(arbitrary_self_types)]
pub use ::jni_sys as sys;
use std::fmt;
mod refs {
mod arg;
mod global;
mod local;
mod ref_;
mod return_;
pub use arg::*;
pub use global::*;
pub use local::*;
pub use ref_::*;
pub use return_::*;
}
mod array;
mod as_arg;
mod as_jvalue;
mod env;
mod id_cache;
mod jni_type;
mod string_chars;
mod vm;
pub use array::*;
pub use as_arg::*;
pub use as_jvalue::*;
pub use env::*;
pub use id_cache::*;
pub use jni_type::JniType;
pub use refs::*;
pub use string_chars::*;
pub use vm::*;
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
pub struct CastError;
impl std::error::Error for CastError {}
impl fmt::Display for CastError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str("Cast failed")
}
}
pub trait ThrowableType: ReferenceType {}
#[doc(hidden)]
#[warn(clippy::missing_safety_doc)]
pub unsafe trait ReferenceType: JniType + Sized + 'static {}
pub unsafe trait AssignableTo<T: ReferenceType>: ReferenceType {}
unsafe impl<T: ReferenceType> AssignableTo<T> for T {}
pub trait JavaDisplay: ReferenceType {
fn fmt(self: &Ref<'_, Self>, f: &mut fmt::Formatter<'_>) -> fmt::Result;
}
pub trait JavaDebug: ReferenceType {
fn fmt(self: &Ref<'_, Self>, f: &mut fmt::Formatter<'_>) -> fmt::Result;
}
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
pub struct Null;