Enum x11rb_protocol::protocol::xinput::InputStateData
source · pub enum InputStateData {
Key(InputStateDataKey),
Button(InputStateDataButton),
Valuator(InputStateDataValuator),
InvalidValue(u8),
}
Variants§
Key(InputStateDataKey)
Button(InputStateDataButton)
Valuator(InputStateDataValuator)
InvalidValue(u8)
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 InputStateData
impl InputStateData
pub fn as_key(&self) -> Option<&InputStateDataKey>
pub fn as_valuator(&self) -> Option<&InputStateDataValuator>
Trait Implementations§
source§impl Clone for InputStateData
impl Clone for InputStateData
source§fn clone(&self) -> InputStateData
fn clone(&self) -> InputStateData
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 InputStateData
impl Debug for InputStateData
source§impl<'de> Deserialize<'de> for InputStateData
impl<'de> Deserialize<'de> for InputStateData
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 InputStateData
impl Hash for InputStateData
source§impl Ord for InputStateData
impl Ord for InputStateData
source§fn cmp(&self, other: &InputStateData) -> Ordering
fn cmp(&self, other: &InputStateData) -> 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 InputStateData
impl PartialEq for InputStateData
source§fn eq(&self, other: &InputStateData) -> bool
fn eq(&self, other: &InputStateData) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for InputStateData
impl PartialOrd for InputStateData
source§fn partial_cmp(&self, other: &InputStateData) -> Option<Ordering>
fn partial_cmp(&self, other: &InputStateData) -> 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 InputStateData
impl Serialize for InputStateData
impl Eq for InputStateData
impl StructuralPartialEq for InputStateData
Auto Trait Implementations§
impl Freeze for InputStateData
impl RefUnwindSafe for InputStateData
impl Send for InputStateData
impl Sync for InputStateData
impl Unpin for InputStateData
impl UnwindSafe for InputStateData
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