pub enum DeviceType {
Unknown,
Touchpad,
Trackball,
Trackpoint,
Mouse,
Tablet,
Keyboard,
Switch,
}
Expand description
A device’s type.
Note: this uses heuristics to determine device type.
This may be incorrect. For example, a device with both pointer
and keyboard capabilities will be labeled as a Mouse
when it might actually be
a keyboard.
Variants§
Unknown
The device type is unknown.
Touchpad
This device is a touchpad.
Trackball
This device is a trackball.
Trackpoint
This device is a trackpoint.
Mouse
This device is a mouse.
Tablet
This device is a tablet.
Keyboard
This device is a keyboard.
Switch
This device is a switch.
Implementations§
Source§impl DeviceType
impl DeviceType
Sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Returns true
if the device type is Unknown
.
Sourcepub fn is_touchpad(&self) -> bool
pub fn is_touchpad(&self) -> bool
Returns true
if the device type is Touchpad
.
Sourcepub fn is_trackball(&self) -> bool
pub fn is_trackball(&self) -> bool
Returns true
if the device type is Trackball
.
Sourcepub fn is_trackpoint(&self) -> bool
pub fn is_trackpoint(&self) -> bool
Returns true
if the device type is Trackpoint
.
Sourcepub fn is_keyboard(&self) -> bool
pub fn is_keyboard(&self) -> bool
Returns true
if the device type is Keyboard
.
Trait Implementations§
Source§impl Clone for DeviceType
impl Clone for DeviceType
Source§fn clone(&self) -> DeviceType
fn clone(&self) -> DeviceType
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 DeviceType
impl Debug for DeviceType
Source§impl Default for DeviceType
impl Default for DeviceType
Source§fn default() -> DeviceType
fn default() -> DeviceType
Returns the “default value” for a type. Read more
Source§impl From<DeviceType> for DeviceType
impl From<DeviceType> for DeviceType
Source§impl Hash for DeviceType
impl Hash for DeviceType
Source§impl PartialEq for DeviceType
impl PartialEq for DeviceType
impl Copy for DeviceType
impl Eq for DeviceType
impl StructuralPartialEq for DeviceType
Auto Trait Implementations§
impl Freeze for DeviceType
impl RefUnwindSafe for DeviceType
impl Send for DeviceType
impl Sync for DeviceType
impl Unpin for DeviceType
impl UnwindSafe for DeviceType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered
].