win_hotkeys/error.rs
1//! Defines the error types used throughout the crate.
2//! Errors are represented by the [`WHKError`] enum, which encapsulates
3//! various error scenarios such as invalid keys or failed hotkey registration.
4
5use thiserror::Error;
6
7/// An enumeration of errors that may occur while using the crate.
8#[derive(Error, Debug)]
9pub enum WHKError {
10 #[error("Hotkey registration failed. Hotkey is already in use.")]
11 RegistrationFailed,
12 #[error("Invalid key name `{0}`")]
13 InvalidKey(String),
14}