Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub trait SensorModule
- {
- type Data;
- type Iter: Iterator<Item=(SystemTime, Self::Data)>;
- fn get_name(&self) -> &'static str;
- fn iter(&self) -> Box<Self::Iter>;
- }
- impl<'a, P: 'a> SensorModule for AM2315<'a, P> where P: I2CDevice {
- fn get_name(&self) -> &'static str {
- "AM2315 Temp/Hum Module"
- }
- type Data = f32;
- type Iter = Box<Iterator<Item=(SystemTime, Self::Data)>>;
- fn iter(&self) -> Self::Iter {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement