Trait TemperatureSensor

Source
pub trait TemperatureSensor: ErrorType {
    // Required method
    async fn temperature(&mut self) -> Result<DegreesCelsius, Self::Error>;
}
Expand description

Async Temperature Sensor methods.

Required Methods§

Source

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.

Implementations on Foreign Types§

Source§

impl<T: TemperatureSensor + ?Sized> TemperatureSensor for &mut T

Source§

async fn temperature(&mut self) -> Result<DegreesCelsius, Self::Error>

Implementors§