pub enum InputDeviceType {
Keyboard,
LightSensor,
ConsumerControls,
Mouse,
Touch,
}
Expand description
Generic types of supported input devices.
Variants§
Implementations§
source§impl InputDeviceType
impl InputDeviceType
sourcepub fn try_from_assembly_config_entry(
device: impl AsRef<str>
) -> Option<InputDeviceType>
pub fn try_from_assembly_config_entry( device: impl AsRef<str> ) -> Option<InputDeviceType>
Parses an InputDeviceType
string that has been serialized from
src/lib/assembly/config_schema/src/product_config.rs
: InputDeviceType
, which has
slightly different names.
If a device string isn’t recognized, returns None
.
sourcepub fn list_from_structured_config_list<'a, V, T>(
list: V
) -> Vec<InputDeviceType>
pub fn list_from_structured_config_list<'a, V, T>( list: V ) -> Vec<InputDeviceType>
Parses a list of supported InputDeviceType
s from a structured configuration
supported_input_devices
list. Unknown device types are logged and skipped.
Trait Implementations§
source§impl Clone for InputDeviceType
impl Clone for InputDeviceType
source§fn clone(&self) -> InputDeviceType
fn clone(&self) -> InputDeviceType
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 InputDeviceType
impl Debug for InputDeviceType
source§impl Display for InputDeviceType
impl Display for InputDeviceType
source§impl Hash for InputDeviceType
impl Hash for InputDeviceType
source§impl PartialEq for InputDeviceType
impl PartialEq for InputDeviceType
source§fn eq(&self, other: &InputDeviceType) -> bool
fn eq(&self, other: &InputDeviceType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for InputDeviceType
impl Eq for InputDeviceType
impl StructuralPartialEq for InputDeviceType
Auto Trait Implementations§
impl Freeze for InputDeviceType
impl RefUnwindSafe for InputDeviceType
impl Send for InputDeviceType
impl Sync for InputDeviceType
impl Unpin for InputDeviceType
impl UnwindSafe for InputDeviceType
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