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,5 +1,13 @@
use thiserror::Error;
#[derive(Debug, Error)]
pub enum InputCaptureError {
#[error("error creating input-capture: `{0}`")]
Create(#[from] CaptureCreationError),
#[error("error while capturing input: `{0}`")]
Capture(#[from] CaptureError),
}
#[cfg(all(unix, feature = "wayland", not(target_os = "macos")))]
use std::io;
#[cfg(all(unix, feature = "wayland", not(target_os = "macos")))]

View File

@@ -5,7 +5,7 @@ use futures_core::Stream;
use input_event::Event;
pub use error::{CaptureCreationError, CaptureError};
pub use error::{CaptureCreationError, CaptureError, InputCaptureError};
pub mod error;