Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub struct AM2315<'a, P : 'a> where P : I2CDevice {
- device: &'a P,
- }
- impl<'a, P: 'a> AM2315<'a, P> where P: I2CDevice {
- pub fn new(device: &'a P) -> Self {
- AM2315 {
- device: device
- }
- }
- }
- 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 = Iterator<Item=(SystemTime, f32)>;
- fn iter(&self) -> Self::Iter { ///// This line is causing problems.
- }
- }
- /// Problem:
- {
- "resource": "/home/tball/Udvikling/git/home_surveillance/src/modules/temp.rs",
- "owner": "rust",
- "code": "E0277",
- "severity": 8,
- "message": "the size for values of type `(dyn std::iter::Iterator<Item=(std::time::SystemTime, f32)> + 'static)` cannot be known at compilation time",
- "startLineNumber": 18,
- "startColumn": 17,
- "endLineNumber": 18,
- "endColumn": 17
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement