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:
parent
bdcc13bad6
commit
ba7ead9848
4 changed files with 52 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue