Enum x11rb_protocol::protocol::xinput::DeviceStateData
source · pub enum DeviceStateData {
Resolution(DeviceStateDataResolution),
AbsCalib(DeviceStateDataAbsCalib),
Core(DeviceStateDataCore),
Enable(u8),
AbsArea(DeviceStateDataAbsArea),
InvalidValue(u16),
}
Variants§
Resolution(DeviceStateDataResolution)
AbsCalib(DeviceStateDataAbsCalib)
Core(DeviceStateDataCore)
Enable(u8)
AbsArea(DeviceStateDataAbsArea)
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 DeviceStateData
impl DeviceStateData
pub fn as_resolution(&self) -> Option<&DeviceStateDataResolution>
pub fn as_abs_calib(&self) -> Option<&DeviceStateDataAbsCalib>
pub fn as_core(&self) -> Option<&DeviceStateDataCore>
pub fn as_enable(&self) -> Option<&u8>
pub fn as_abs_area(&self) -> Option<&DeviceStateDataAbsArea>
Trait Implementations§
source§impl Clone for DeviceStateData
impl Clone for DeviceStateData
source§fn clone(&self) -> DeviceStateData
fn clone(&self) -> DeviceStateData
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 DeviceStateData
impl Debug for DeviceStateData
source§impl<'de> Deserialize<'de> for DeviceStateData
impl<'de> Deserialize<'de> for DeviceStateData
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 DeviceStateData
impl Hash for DeviceStateData
source§impl Ord for DeviceStateData
impl Ord for DeviceStateData
source§fn cmp(&self, other: &DeviceStateData) -> Ordering
fn cmp(&self, other: &DeviceStateData) -> 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 DeviceStateData
impl PartialEq for DeviceStateData
source§fn eq(&self, other: &DeviceStateData) -> bool
fn eq(&self, other: &DeviceStateData) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for DeviceStateData
impl PartialOrd for DeviceStateData
source§fn partial_cmp(&self, other: &DeviceStateData) -> Option<Ordering>
fn partial_cmp(&self, other: &DeviceStateData) -> 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 DeviceStateData
impl Serialize for DeviceStateData
impl Eq for DeviceStateData
impl StructuralPartialEq for DeviceStateData
Auto Trait Implementations§
impl Freeze for DeviceStateData
impl RefUnwindSafe for DeviceStateData
impl Send for DeviceStateData
impl Sync for DeviceStateData
impl Unpin for DeviceStateData
impl UnwindSafe for DeviceStateData
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