pub enum Input {
Button(ButtonArgs),
Move(Motion),
Text(String),
Resize(ResizeArgs),
Focus(bool),
Cursor(bool),
FileDrag(FileDrag),
Close(CloseArgs),
}
Expand description
Models input events.
Variants§
Button(ButtonArgs)
Changed button state.
Move(Motion)
Moved mouse cursor.
Text(String)
Text (usually from keyboard).
Resize(ResizeArgs)
Window got resized.
Focus(bool)
Window gained or lost focus.
Cursor(bool)
Window gained or lost cursor.
FileDrag(FileDrag)
A file is being dragged or dropped over the window.
Close(CloseArgs)
Window closed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Input
impl<'de> Deserialize<'de> for Input
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 From<ButtonArgs> for Input
impl From<ButtonArgs> for Input
Source§fn from(args: ButtonArgs) -> Self
fn from(args: ButtonArgs) -> Self
Converts to this type from the input type.
Source§impl From<ControllerAxisArgs> for Input
impl From<ControllerAxisArgs> for Input
Source§fn from(args: ControllerAxisArgs) -> Self
fn from(args: ControllerAxisArgs) -> Self
Converts to this type from the input type.
Source§impl PartialOrd for Input
impl PartialOrd for Input
impl StructuralPartialEq for Input
Auto Trait Implementations§
impl Freeze for Input
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnwindSafe for Input
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