summaryrefslogtreecommitdiffstats
path: root/src/emulate/dummy.rs
blob: fbb7b31ce046200b03d67cee67c95ba5405bf990 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use crate::{
    client::{ClientEvent, ClientHandle},
    emulate::InputEmulation,
    event::Event,
};
use async_trait::async_trait;

#[derive(Default)]
pub struct DummyEmulation;

impl DummyEmulation {
    pub fn new() -> Self {
        Self {}
    }
}

#[async_trait]
impl InputEmulation for DummyEmulation {
    async fn consume(&mut self, event: Event, client_handle: ClientHandle) {
        log::info!("received event: ({client_handle}) {event}");
    }
    async fn notify(&mut self, client_event: ClientEvent) {
        log::info!("{client_event:?}");
    }
    async fn destroy(&mut self) {}
}