#[non_exhaustive]pub enum ParseHotkeyError {
Empty,
EmptySegment,
UnknownToken(String),
MissingKey,
MultipleKeys,
}Expand description
Error returned when parsing a hotkey or key from a string fails.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Empty
The input string was empty.
EmptySegment
A segment between + separators was empty (e.g., "Ctrl++A").
UnknownToken(String)
A token could not be recognized as a key or modifier.
MissingKey
The hotkey contained only modifiers with no trigger key.
MultipleKeys
The hotkey contained more than one non-modifier key.
Trait Implementations§
Source§impl Clone for ParseHotkeyError
impl Clone for ParseHotkeyError
Source§fn clone(&self) -> ParseHotkeyError
fn clone(&self) -> ParseHotkeyError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParseHotkeyError
impl Debug for ParseHotkeyError
Source§impl Display for ParseHotkeyError
impl Display for ParseHotkeyError
Source§impl Error for ParseHotkeyError
impl Error for ParseHotkeyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ParseHotkeyError> for Error
impl From<ParseHotkeyError> for Error
Source§fn from(source: ParseHotkeyError) -> Self
fn from(source: ParseHotkeyError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ParseHotkeyError
impl PartialEq for ParseHotkeyError
impl Eq for ParseHotkeyError
impl StructuralPartialEq for ParseHotkeyError
Auto Trait Implementations§
impl Freeze for ParseHotkeyError
impl RefUnwindSafe for ParseHotkeyError
impl Send for ParseHotkeyError
impl Sync for ParseHotkeyError
impl Unpin for ParseHotkeyError
impl UnsafeUnpin for ParseHotkeyError
impl UnwindSafe for ParseHotkeyError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more