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

Function init

src/droidplug/mod.rs:13–17  ·  view source on GitHub ↗
(env: &JNIEnv)

Source from the content-addressed store, hash-verified

11static GLOBAL_ADAPTER: OnceCell<adapter::Adapter> = OnceCell::new();
12
13pub fn init(env: &JNIEnv) -> crate::Result<()> {
14 self::jni::init(env)?;
15 GLOBAL_ADAPTER.get_or_try_init(|| adapter::Adapter::new())?;
16 Ok(())
17}
18
19pub fn global_adapter() -> &'static adapter::Adapter {
20 GLOBAL_ADAPTER.get().expect(

Callers 5

mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected