pub trait ApplicationLogic: Sized + 'static {
Show 14 methods
// Required methods
fn new() -> Self;
fn tick(&mut self);
// Provided methods
fn wants_to_quit(&self) -> bool { ... }
fn keyboard_input(&mut self, _state: ButtonState, _key_code: KeyCode) { ... }
fn cursor_entered(&mut self) { ... }
fn cursor_left(&mut self) { ... }
fn cursor_moved(&mut self, _position: UVec2) { ... }
fn mouse_input(&mut self, _state: ButtonState, _button: MouseButton) { ... }
fn mouse_wheel(&mut self, _delta_y: i16) { ... }
fn mouse_motion(&mut self, _delta: Vec2) { ... }
fn gamepad_activated(&mut self, _gamepad_id: GamePadId, _name: String) { ... }
fn gamepad_button_changed(
&mut self,
_gamepad: &Gamepad,
_button: Button,
_value: Fp,
) { ... }
fn gamepad_axis_changed(
&mut self,
_gamepad: &Gamepad,
_axis: Axis,
_value: Fp,
) { ... }
fn gamepad_disconnected(&mut self, _gamepad_id: GamePadId) { ... }
}
Required Methods§
Provided Methods§
fn wants_to_quit(&self) -> bool
fn keyboard_input(&mut self, _state: ButtonState, _key_code: KeyCode)
fn cursor_entered(&mut self)
fn cursor_left(&mut self)
fn cursor_moved(&mut self, _position: UVec2)
fn mouse_input(&mut self, _state: ButtonState, _button: MouseButton)
fn mouse_wheel(&mut self, _delta_y: i16)
fn mouse_motion(&mut self, _delta: Vec2)
fn gamepad_activated(&mut self, _gamepad_id: GamePadId, _name: String)
fn gamepad_axis_changed(&mut self, _gamepad: &Gamepad, _axis: Axis, _value: Fp)
fn gamepad_disconnected(&mut self, _gamepad_id: GamePadId)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.