Enum gilrs::MappingError
source · #[non_exhaustive]pub enum MappingError {
InvalidCode(Code),
InvalidName,
NotImplemented,
NotConnected,
DuplicatedEntry,
UnknownElement,
NotSdl2Compatible,
}
Expand description
The error type for functions related to gamepad mapping.
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.
InvalidCode(Code)
Gamepad does not have element referenced by EvCode
.
InvalidName
Name contains comma (‘,’).
NotImplemented
This function is not implemented for current platform.
NotConnected
Gamepad is not connected.
DuplicatedEntry
Same gamepad element is referenced by axis and button.
UnknownElement
Mapping
with Button::Unknown
or Axis::Unknown
.
NotSdl2Compatible
Mapping
have button or axis that are not present in SDL2.
Trait Implementations§
source§impl Clone for MappingError
impl Clone for MappingError
source§fn clone(&self) -> MappingError
fn clone(&self) -> MappingError
Returns a copy 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 MappingError
impl Debug for MappingError
source§impl Display for MappingError
impl Display for MappingError
source§impl Error for MappingError
impl Error for MappingError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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 PartialEq for MappingError
impl PartialEq for MappingError
source§fn eq(&self, other: &MappingError) -> bool
fn eq(&self, other: &MappingError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for MappingError
impl Eq for MappingError
impl StructuralPartialEq for MappingError
Auto Trait Implementations§
impl Freeze for MappingError
impl RefUnwindSafe for MappingError
impl Send for MappingError
impl Sync for MappingError
impl Unpin for MappingError
impl UnwindSafe for MappingError
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