pub trait DistanceSensor<E> {
    fn get_distance_in_mm(&mut self) -> Result<u16, E>;
}
Expand description

Represents a simple distance sensor.

For simplicity the error is currently not modelled here but instead the error of the actual implementation will be used (it’s not referenced directly anywhere in Car, so this is fine).

Required Methods

Get the distance measured in millimeters (if available).

Implementations on Foreign Types

Implementors