Trait input_emulation::InputEmulation

source ·
pub trait InputEmulation: Send {
    // Required methods
    fn consume<'life0, 'async_trait>(
        &'life0 mut self,
        event: Event,
        handle: EmulationHandle,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create<'life0, 'async_trait>(
        &'life0 mut self,
        handle: EmulationHandle,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn destroy<'life0, 'async_trait>(
        &'life0 mut self,
        handle: EmulationHandle,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn dispatch<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

source

fn consume<'life0, 'async_trait>( &'life0 mut self, event: Event, handle: EmulationHandle, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

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

source

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

Provided Methods§

source

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

this function is waited on continuously and can be used to handle events

Implementors§