1
0
Fork 0
mirror of https://codeberg.org/icewind/mitemp-rs.git synced 2026-06-04 01:34:09 +02:00

more example readme and clonable

This commit is contained in:
Robin Appelman 2020-02-08 13:40:37 +01:00
commit ba7ead9848
4 changed files with 52 additions and 0 deletions

View file

@ -12,14 +12,17 @@ use std::sync::{Arc, Mutex};
pub trait SensorState {}
#[derive(Clone)]
pub struct Inactive {}
impl SensorState for Inactive {}
#[derive(Clone)]
pub struct Active {}
impl SensorState for Active {}
#[derive(Clone)]
pub struct Sensor<State: SensorState> {
mac: BDAddr,
adapter: ConnectedAdapter,