#[non_exhaustive]pub enum KeyConversionError {
UnsupportedKeyCode(&'static str),
UnsupportedModifier(&'static str),
NonPressEvent,
}Expand description
Errors produced when converting a foreign key event into the SDK vocabulary.
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.
UnsupportedKeyCode(&'static str)
The foreign event used a key code variant that the SDK does not model (for example a media key when no enhancement flags were negotiated).
UnsupportedModifier(&'static str)
The foreign event used modifier bits the SDK does not model.
NonPressEvent
The foreign event reported a key release/repeat the SDK ignores.
Trait Implementations§
Source§impl Clone for KeyConversionError
impl Clone for KeyConversionError
Source§fn clone(&self) -> KeyConversionError
fn clone(&self) -> KeyConversionError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for KeyConversionError
Source§impl Debug for KeyConversionError
impl Debug for KeyConversionError
Source§impl Display for KeyConversionError
impl Display for KeyConversionError
impl Eq for KeyConversionError
Source§impl Error for KeyConversionError
impl Error for KeyConversionError
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 Hash for KeyConversionError
impl Hash for KeyConversionError
Source§impl PartialEq for KeyConversionError
impl PartialEq for KeyConversionError
Source§fn eq(&self, other: &KeyConversionError) -> bool
fn eq(&self, other: &KeyConversionError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for KeyConversionError
Auto Trait Implementations§
impl Freeze for KeyConversionError
impl RefUnwindSafe for KeyConversionError
impl Send for KeyConversionError
impl Sync for KeyConversionError
impl Unpin for KeyConversionError
impl UnsafeUnpin for KeyConversionError
impl UnwindSafe for KeyConversionError
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