Enum x11rb_protocol::protocol::xinput::DeviceClassData
source · pub enum DeviceClassData {
Key(DeviceClassDataKey),
Button(DeviceClassDataButton),
Valuator(DeviceClassDataValuator),
Scroll(DeviceClassDataScroll),
Touch(DeviceClassDataTouch),
Gesture(DeviceClassDataGesture),
InvalidValue(u16),
}
Variants§
Key(DeviceClassDataKey)
Button(DeviceClassDataButton)
Valuator(DeviceClassDataValuator)
Scroll(DeviceClassDataScroll)
Touch(DeviceClassDataTouch)
Gesture(DeviceClassDataGesture)
InvalidValue(u16)
This variant is returned when the server sends a discriminant value that does not match any of the defined by the protocol.
Usually, this should be considered a parsing error, but there are some cases where the server violates the protocol.
Trying to use serialize
or serialize_into
with this variant
will raise a panic.
Implementations§
source§impl DeviceClassData
impl DeviceClassData
pub fn as_key(&self) -> Option<&DeviceClassDataKey>
pub fn as_valuator(&self) -> Option<&DeviceClassDataValuator>
pub fn as_scroll(&self) -> Option<&DeviceClassDataScroll>
pub fn as_touch(&self) -> Option<&DeviceClassDataTouch>
pub fn as_gesture(&self) -> Option<&DeviceClassDataGesture>
Trait Implementations§
source§impl Clone for DeviceClassData
impl Clone for DeviceClassData
source§fn clone(&self) -> DeviceClassData
fn clone(&self) -> DeviceClassData
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 DeviceClassData
impl Debug for DeviceClassData
source§impl<'de> Deserialize<'de> for DeviceClassData
impl<'de> Deserialize<'de> for DeviceClassData
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for DeviceClassData
impl Hash for DeviceClassData
source§impl Ord for DeviceClassData
impl Ord for DeviceClassData
source§fn cmp(&self, other: &DeviceClassData) -> Ordering
fn cmp(&self, other: &DeviceClassData) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for DeviceClassData
impl PartialEq for DeviceClassData
source§fn eq(&self, other: &DeviceClassData) -> bool
fn eq(&self, other: &DeviceClassData) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for DeviceClassData
impl PartialOrd for DeviceClassData
source§fn partial_cmp(&self, other: &DeviceClassData) -> Option<Ordering>
fn partial_cmp(&self, other: &DeviceClassData) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for DeviceClassData
impl Serialize for DeviceClassData
impl Eq for DeviceClassData
impl StructuralPartialEq for DeviceClassData
Auto Trait Implementations§
impl Freeze for DeviceClassData
impl RefUnwindSafe for DeviceClassData
impl Send for DeviceClassData
impl Sync for DeviceClassData
impl Unpin for DeviceClassData
impl UnwindSafe for DeviceClassData
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