Enum FeedbackStateData
pub enum FeedbackStateData {
Keyboard(FeedbackStateDataKeyboard),
Pointer(FeedbackStateDataPointer),
String(FeedbackStateDataString),
Integer(FeedbackStateDataInteger),
Led(FeedbackStateDataLed),
Bell(FeedbackStateDataBell),
InvalidValue(u8),
}
Variants§
Keyboard(FeedbackStateDataKeyboard)
Pointer(FeedbackStateDataPointer)
String(FeedbackStateDataString)
Integer(FeedbackStateDataInteger)
Led(FeedbackStateDataLed)
Bell(FeedbackStateDataBell)
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§
§impl FeedbackStateData
impl FeedbackStateData
pub fn as_keyboard(&self) -> Option<&FeedbackStateDataKeyboard>
pub fn as_pointer(&self) -> Option<&FeedbackStateDataPointer>
pub fn as_string(&self) -> Option<&FeedbackStateDataString>
pub fn as_integer(&self) -> Option<&FeedbackStateDataInteger>
pub fn as_led(&self) -> Option<&FeedbackStateDataLed>
pub fn as_bell(&self) -> Option<&FeedbackStateDataBell>
Trait Implementations§
§impl Clone for FeedbackStateData
impl Clone for FeedbackStateData
§fn clone(&self) -> FeedbackStateData
fn clone(&self) -> FeedbackStateData
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 FeedbackStateData
impl RefUnwindSafe for FeedbackStateData
impl Send for FeedbackStateData
impl Sync for FeedbackStateData
impl Unpin for FeedbackStateData
impl UnwindSafe for FeedbackStateData
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
)