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

Method peripheral_mut

src/common/adapter_manager.rs:82–87  ·  view source on GitHub ↗
(
        &self,
        id: &PeripheralId,
    )

Source from the content-addressed store, hash-verified

80 // Only used on windows and macOS/iOS, so turn off deadcode so we don't get warnings on android/linux.
81 #[allow(dead_code)]
82 pub fn peripheral_mut(
83 &self,
84 id: &PeripheralId,
85 ) -> Option<RefMut<'_, PeripheralId, PeripheralType>> {
86 self.peripherals.get_mut(id)
87 }
88
89 pub fn peripheral(&self, id: &PeripheralId) -> Option<PeripheralType> {
90 self.peripherals.get(id).map(|val| val.value().clone())

Callers 2

start_scanMethod · 0.80
newMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected