openrr_teleop

Trait ControlMode

Source
pub trait ControlMode: Send + Sync {
    // Required methods
    fn handle_event(&self, event: GamepadEvent);
    fn proc<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn mode(&self) -> &str;
    fn submode(&self) -> String;
}

Required Methods§

Source

fn handle_event(&self, event: GamepadEvent)

Source

fn proc<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn mode(&self) -> &str

Source

fn submode(&self) -> String

Implementations on Foreign Types§

Source§

impl<T: ControlMode + ?Sized> ControlMode for Box<T>
where Box<T>: Send + Sync,

Source§

fn handle_event(&self, event: GamepadEvent)

Source§

fn proc<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn mode(&self) -> &str

Source§

fn submode(&self) -> String

Implementors§