Trait vex_rt::rtos::DataSource

source ·
pub trait DataSource {
    type Data: Clone + 'static;
    type Error;

    fn read(&self) -> Result<Self::Data, Self::Error>;
}
Expand description

Describes an object which is a source of data, such as a sensor.

Used to facilitate broadcasting readings via IntoBroadcast.

Required Associated Types§

The type of data produced by the data source.

The type of errors which could occur while reading data.

Required Methods§

Tries to read a new value form the data source.

Implementors§