Struct rebind::InputTranslator
[−]
[src]
pub struct InputTranslator<A: Action, S: BuildHasher = RandomState> { /* fields omitted */ }
An object which translates piston::input::Input events into input_map::Translated events
Methods
impl<A: Action, S: BuildHasher + Default> InputTranslator<A, S>
[src]
fn new<Sz: Into<Size>>(size: Sz) -> Self
Creates an empty InputTranslator.
fn translate(&self, input: &Input) -> Option<Translated<A>>
Translate an Input into a Translated event. Returns None
if there is no
action associated with the Input
variant.
fn set_size<Sz: Into<Size>>(&mut self, size: Sz)
Re-set the mouse bounds size used for calculating mouse events
fn set_size_from_viewport(&mut self, vp: Viewport)
Re-set the mouse bounds size from a viewport
fn into_rebind(self) -> InputRebind<A, S>
Convert the InputTranslator
into an InputRebind
. Consumes the
InputTranslator
.
Trait Implementations
impl<A: Clone + Action, S: Clone + BuildHasher> Clone for InputTranslator<A, S>
[src]
fn clone(&self) -> InputTranslator<A, S>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<A: Debug + Action, S: Debug + BuildHasher> Debug for InputTranslator<A, S>
[src]
impl<A: PartialEq + Action, S: PartialEq + BuildHasher> PartialEq for InputTranslator<A, S>
[src]
fn eq(&self, __arg_0: &InputTranslator<A, S>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &InputTranslator<A, S>) -> bool
This method tests for !=
.
impl<A: Action, S: BuildHasher + Default> Into<InputRebind<A, S>> for InputTranslator<A, S>
[src]
fn into(self) -> InputRebind<A, S>
Performs the conversion.