rename producer, consumer to emulation and capture (#98)

input emulation / input capture is clearer than event consumer and producer
This commit is contained in:
Ferdinand Schober
2024-03-21 20:26:57 +01:00
committed by GitHub
parent 78c9de45c7
commit 742b1585d7
23 changed files with 237 additions and 237 deletions

26
src/emulate/dummy.rs Normal file
View File

@@ -0,0 +1,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) {}
}