move capture/emulation errors into their creates

This commit is contained in:
Ferdinand Schober
2024-07-15 21:10:30 +02:00
parent 3d7163bf1f
commit f3de36bc26
10 changed files with 57 additions and 49 deletions

View File

@@ -1,3 +1,11 @@
#[derive(Debug, Error)]
pub enum InputEmulationError {
#[error("error creating input-emulation: `{0}`")]
Create(#[from] EmulationCreationError),
#[error("error emulating input: `{0}`")]
Emulate(#[from] EmulationError),
}
#[cfg(all(unix, feature = "libei", not(target_os = "macos")))]
use ashpd::{desktop::ResponseError, Error::Response};
#[cfg(all(unix, feature = "libei", not(target_os = "macos")))]

View File

@@ -1,10 +1,9 @@
use async_trait::async_trait;
use error::EmulationError;
use std::fmt::Display;
use input_event::Event;
use self::error::EmulationCreationError;
pub use self::error::{EmulationCreationError, EmulationError, InputEmulationError};
#[cfg(windows)]
pub mod windows;