pub struct State {
pub modifiers: Modifiers,
pub pointer: PointerState,
pub wall_time: f64,
}
Expand description
Current input state.
Sent along with each Event
so you can, for instance,
spawn something along the world ray when a button is pressed,
or check which modifier keys were down then the user pressed Key::U
.
Fields
modifiers: Modifiers
Which modifier keys are pressed?
pointer: PointerState
State of the primary pointer (mouse or first touch).
wall_time: f64
Number of seconds since start of module (applet.real_time_since_start()
).
Trait Implementations
sourceimpl PartialEq<State> for State
impl PartialEq<State> for State
impl Copy for State
impl StructuralPartialEq for State
Auto Trait Implementations
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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