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<Input, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Input, <__D as Deserializer<'de>>::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) -> Input
fn from(args: ButtonArgs) -> Input
Converts to this type from the input type.
source§impl From<ControllerAxisArgs> for Input
impl From<ControllerAxisArgs> for Input
source§fn from(args: ControllerAxisArgs) -> Input
fn from(args: ControllerAxisArgs) -> Input
Converts to this type from the input type.
source§impl PartialEq for Input
impl PartialEq for Input
source§impl PartialOrd for Input
impl PartialOrd for Input
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for Input
impl Serialize for Input
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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