Struct dotrix_core::input::Mapper [−][src]
Mapper for input
Implementations
impl<T> Mapper<T> where
T: Copy + Eq + Hash,
[src]
T: Copy + Eq + Hash,
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
Auto Trait Implementations
impl<T> RefUnwindSafe for Mapper<T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T> Send for Mapper<T> where
T: Send,
[src]
T: Send,
impl<T> Sync for Mapper<T> where
T: Sync,
[src]
T: Sync,
impl<T> Unpin for Mapper<T> where
T: Unpin,
[src]
T: Unpin,
impl<T> UnwindSafe for Mapper<T> where
T: UnwindSafe,
[src]
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Component for T where
T: 'static + Send + Sync,
[src]
T: 'static + Send + Sync,
impl<T> Downcast<T> for T
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> SystemContext for T where
T: 'static + Default + Send + Sync,
[src]
T: 'static + Default + Send + Sync,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.