Struct dotrix_core::input::Mapper[][src]

pub struct Mapper<T> { /* fields omitted */ }

Mapper for input

Implementations

impl<T> Mapper<T> where
    T: Copy + Eq + Hash
[src]

pub fn new() -> Self[src]

pub fn add_action(&mut self, action: T, button: Button)[src]

Add a new action to mapper. If action already exists, it will be overridden.

pub fn add_actions(&mut self, actions: Vec<(T, Button)>)[src]

Add multiple actions to mapper. Existing actions will be overridden.

pub fn get_button(&self, action: T) -> Option<&Button>[src]

Get button that is binded to that action.

pub fn remove_action(&mut self, action: T)[src]

Remove action from mapper.

pub fn remove_actions(&mut self, actions: Vec<T>)[src]

Remove multiple actions from mapper.

pub fn set(&mut self, actions: Vec<(T, Button)>)[src]

Removes all actions and set new ones.

Trait Implementations

impl<T: Copy + Eq + Hash> Default for Mapper<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Mapper<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for Mapper<T> where
    T: Send
[src]

impl<T> Sync for Mapper<T> where
    T: Sync
[src]

impl<T> Unpin for Mapper<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for Mapper<T> where
    T: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Component for T where
    T: 'static + Send + Sync
[src]

impl<T> Downcast<T> for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> SystemContext for T where
    T: 'static + Default + Send + Sync
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Upcast<T> for T