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

Method poll_internal

src/droidplug/jni_utils/future.rs:81–91  ·  view source on GitHub ↗
(&self, context: &mut Context<'_>)

Source from the content-addressed store, hash-verified

79
80impl<'a: 'b, 'b> JFutureIntoFuture<'a, 'b> {
81 fn poll_internal(&self, context: &mut Context<'_>) -> Result<Poll<JPollResult<'a, 'b>>> {
82 use super::task::waker;
83 let result = self.0.poll(waker(self.0.env, context.waker().clone())?)?;
84 Ok(
85 if self.0.env.is_same_object(result.clone(), JObject::null())? {
86 Poll::Pending
87 } else {
88 Poll::Ready(result)
89 },
90 )
91 }
92}
93
94impl<'a: 'b, 'b> Future for JFutureIntoFuture<'a, 'b> {

Callers 1

pollMethod · 0.80

Calls 3

wakerFunction · 0.85
into_futureMethod · 0.80
pollMethod · 0.65

Tested by

no test coverage detected