pub enum InputEvent {
KeyEvent(KeyEvent),
MouseEvent(MouseEvent),
WindowEvent(WindowEvent),
}
Expand description
Oneof field to handle different types of input events
Variants§
KeyEvent(KeyEvent)
Keyboard event
MouseEvent(MouseEvent)
Mouse event
WindowEvent(WindowEvent)
Window event
Implementations§
Source§impl InputEvent
impl InputEvent
Sourcepub fn merge(
field: &mut Option<InputEvent>,
tag: u32,
wire_type: WireType,
buf: &mut impl Buf,
ctx: DecodeContext,
) -> Result<(), DecodeError>
pub fn merge( field: &mut Option<InputEvent>, tag: u32, wire_type: WireType, buf: &mut impl Buf, ctx: DecodeContext, ) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into self.
Sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
Source§impl Clone for InputEvent
impl Clone for InputEvent
Source§fn clone(&self) -> InputEvent
fn clone(&self) -> InputEvent
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 InputEvent
impl Debug for InputEvent
Source§impl PartialEq for InputEvent
impl PartialEq for InputEvent
impl Copy for InputEvent
impl StructuralPartialEq for InputEvent
Auto Trait Implementations§
impl Freeze for InputEvent
impl RefUnwindSafe for InputEvent
impl Send for InputEvent
impl Sync for InputEvent
impl Unpin for InputEvent
impl UnwindSafe for InputEvent
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