pub trait Sensor:
Send
+ Sync
+ 'static {
// Required methods
fn id(&self) -> &String;
fn kind(&self) -> Execution;
fn stage(&self) -> Stage;
fn observe<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
action: &'life1 Action,
world: &'life2 World,
) -> Pin<Box<dyn Future<Output = Result<Vec<Signal>, SensorError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
}Required Methods§
fn id(&self) -> &String
fn kind(&self) -> Execution
fn stage(&self) -> Stage
fn observe<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
action: &'life1 Action,
world: &'life2 World,
) -> Pin<Box<dyn Future<Output = Result<Vec<Signal>, SensorError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".