Enum piston_window::Input
pub enum Input {
Button(ButtonArgs),
Move(Motion),
Text(String),
Resize(u32, u32),
Focus(bool),
Cursor(bool),
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(u32, u32)
Window got resized.
Focus(bool)
Window gained or lost focus.
Cursor(bool)
Window gained or lost cursor.
Close(CloseArgs)
Window closed.
Trait Implementations
impl<'de> Deserialize<'de> for Input
impl<'de> Deserialize<'de> for Input
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
impl From<ButtonArgs> for Input
impl From<ButtonArgs> for Input
fn from(args: ButtonArgs) -> Input
fn from(args: ButtonArgs) -> Input
Converts to this type from the input type.
impl From<ControllerAxisArgs> for Input
impl From<ControllerAxisArgs> for Input
fn from(args: ControllerAxisArgs) -> Input
fn from(args: ControllerAxisArgs) -> Input
Converts to this type from the input type.
impl Serialize for Input
impl Serialize for Input
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 RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnwindSafe for Input
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
Sets
value
as a parameter of self
.