Enum DeviceClassData
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§
§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§
§impl Clone for DeviceClassData
impl Clone for DeviceClassData
§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 moreAuto 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)