pub trait DeviceCollectionContext<D: Device + DeviceStateSpec, BT: DeviceLayerTypes>: DeviceIdContext<D> {
// Required methods
fn insert(&mut self, device: BasePrimaryDeviceId<D, BT>);
fn remove(
&mut self,
device: &BaseDeviceId<D, BT>,
) -> Option<BasePrimaryDeviceId<D, BT>>;
}
Expand description
A context providing facilities to store and remove primary device IDs.
This allows the device layer APIs to be written generically on D
.
Required Methods§
Sourcefn remove(
&mut self,
device: &BaseDeviceId<D, BT>,
) -> Option<BasePrimaryDeviceId<D, BT>>
fn remove( &mut self, device: &BaseDeviceId<D, BT>, ) -> Option<BasePrimaryDeviceId<D, BT>>
Removes device
from the collection, if it exists.