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

Method disconnect

src/droidplug/peripheral.rs:291–298  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

289 }
290
291 async fn disconnect(&self) -> Result<()> {
292 let future = self.with_obj(|env, obj| JSendFuture::try_from(obj.disconnect()?))?;
293 let result_ref = future.await?;
294 self.with_obj(|env, _obj| {
295 let result = JPollResult::from_env(env, result_ref.as_obj())?;
296 get_poll_result(env, result).map(|_| {})
297 })
298 }
299
300 /// The set of services we've discovered for this device. This will be empty until
301 /// `discover_services` is called.

Callers

nothing calls this directly

Calls 2

get_poll_resultFunction · 0.85
with_objMethod · 0.80

Tested by

no test coverage detected