Trait rust_jni::Cast [−][src]
pub trait Cast<'env, As: Cast<'env, Object<'env>>>: JavaType<__JniType = jobject> + ToJni + FromJni<'env> { fn cast<'a>(&'a self) -> &'a As; }
A trait for casting Java object types to their superclasses.
Required Methods
fn cast<'a>(&'a self) -> &'a As
Cast the object to itself or one of it's superclasses.
Doesn't actually convert anything, the result is just the same object interpreted as one of it's superclasses.
Implementors
impl<'env> Cast<'env, Class<'env>> for Class<'env>
impl<'env> Cast<'env, Object<'env>> for Class<'env>
impl<'env> Cast<'env, String<'env>> for String<'env>
impl<'env> Cast<'env, Object<'env>> for String<'env>
impl<'env> Cast<'env, Throwable<'env>> for Throwable<'env>
impl<'env> Cast<'env, Object<'env>> for Throwable<'env>
impl<'env> Cast<'env, Object<'env>> for Object<'env>