Trait ControllerAxisEvent

Source
pub trait ControllerAxisEvent: Sized {
    // Required methods
    fn from_controller_axis_args(
        args: ControllerAxisArgs,
        old_event: &Self,
    ) -> Option<Self>;
    fn controller_axis<U, F>(&self, f: F) -> Option<U>
       where F: FnMut(ControllerAxisArgs) -> U;

    // Provided method
    fn controller_axis_args(&self) -> Option<ControllerAxisArgs> { ... }
}
Expand description

The position of a controller axis changed.

Required Methods§

Source

fn from_controller_axis_args( args: ControllerAxisArgs, old_event: &Self, ) -> Option<Self>

Creates a controller axis event.

Preserves time stamp from original input event, if any.

Source

fn controller_axis<U, F>(&self, f: F) -> Option<U>
where F: FnMut(ControllerAxisArgs) -> U,

Calls closure if this is a controller axis event.

Provided Methods§

Source

fn controller_axis_args(&self) -> Option<ControllerAxisArgs>

Returns controller axis arguments.

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.

Implementors§