Enum DeviceStateData
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§
§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§
§impl Clone for DeviceStateData
impl Clone for DeviceStateData
§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 moreAuto 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
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
)