MCPcopy Create free account
hub / github.com/deviceplug/btleplug / from_env

Method from_env

src/droidplug/jni_utils/task.rs:34–49  ·  view source on GitHub ↗
(env: &'b JNIEnv<'a>, obj: JObject<'a>)

Source from the content-addressed store, hash-verified

32
33impl<'a: 'b, 'b> JPollResult<'a, 'b> {
34 pub fn from_env(env: &'b JNIEnv<'a>, obj: JObject<'a>) -> Result<Self> {
35 let get = env.get_method_id(
36 JClass::from(
37 super::classcache::get_class("io/github/gedgygedgy/rust/task/PollResult")
38 .unwrap()
39 .as_obj(),
40 ),
41 "get",
42 "()Ljava/lang/Object;",
43 )?;
44 Ok(Self {
45 internal: obj,
46 get,
47 env,
48 })
49 }
50
51 pub fn get(&self) -> Result<JObject<'a>> {
52 self.env

Callers

nothing calls this directly

Calls 1

get_classFunction · 0.85

Tested by

no test coverage detected