mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-21 20:20:55 +03:00
refactor error types
This commit is contained in:
@@ -27,6 +27,7 @@ pub mod macos;
|
||||
|
||||
/// fallback input emulation (logs events)
|
||||
pub mod dummy;
|
||||
pub mod error;
|
||||
|
||||
#[async_trait]
|
||||
pub trait InputEmulation: Send {
|
||||
@@ -41,7 +42,7 @@ pub trait InputEmulation: Send {
|
||||
async fn destroy(&mut self);
|
||||
}
|
||||
|
||||
pub async fn create() -> Box<dyn InputEmulation> {
|
||||
pub async fn create(backend: Option<EmulationBackend>) -> Box<dyn InputEmulation> {
|
||||
#[cfg(windows)]
|
||||
match windows::WindowsEmulation::new() {
|
||||
Ok(c) => return Box::new(c),
|
||||
|
||||
Reference in New Issue
Block a user