General trait for anything that's a wrapper around a java object. This lets us dynamically cast from a Java Object to our typed wrapper
| 31 | /// General trait for anything that's a wrapper around a java object. |
| 32 | /// This lets us dynamically cast from a Java Object to our typed wrapper |
| 33 | pub trait Object<'a>: Sized + AsRef<JObject<'a>> { |
| 34 | /// Dynamically cast from an untyped object to our typed wrappers |
| 35 | fn cast(env: &mut JNIEnv<'a>, obj: JObject<'a>) -> Result<Self>; |
| 36 | } |
| 37 | |
| 38 | impl<'a> Object<'a> for JString<'a> { |
| 39 | fn cast(env: &mut JNIEnv<'a>, obj: JObject<'a>) -> Result<Self> { |
no outgoing calls
no test coverage detected