pub trait TemperatureSensor: ErrorType {
// Required method
async fn temperature(&mut self) -> Result<DegreesCelsius, Self::Error>;
}
Expand description
Async Temperature Sensor methods.
Required Methods§
Sourceasync fn temperature(&mut self) -> Result<DegreesCelsius, Self::Error>
async fn temperature(&mut self) -> Result<DegreesCelsius, Self::Error>
Returns a temperature sample in degrees Celsius.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.