pub trait Cast<'env, As: Cast<'env, Object<'env>>>:
JavaType<__JniType = jobject>
+ ToJni
+ FromJni<'env> {
// Required method
fn cast<'a>(&'a self) -> &'a As;
}Expand description
A trait for casting Java object types to their superclasses.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl<'env> Cast<'env, Class<'env>> for Class<'env>
Make
Class
castable to itself.
impl<'env> Cast<'env, Object<'env>> for Class<'env>
impl<'env> Cast<'env, Object<'env>> for Object<'env>
Make
Object
castable to itself.
impl<'env> Cast<'env, Object<'env>> for String<'env>
impl<'env> Cast<'env, Object<'env>> for Throwable<'env>
impl<'env> Cast<'env, String<'env>> for String<'env>
Make
String
castable to itself.
impl<'env> Cast<'env, Throwable<'env>> for Throwable<'env>
Make
Throwable
castable to itself.