pub struct InputMap<TLinear, TVector> { /* private fields */ }Expand description
Maps between physical inputs providable by the user, and whatever action representation your game uses.
Implementations§
Source§impl<TLinear, TVector> InputMap<TLinear, TVector>
impl<TLinear, TVector> InputMap<TLinear, TVector>
pub fn empty() -> Self
pub fn assign_linear( &mut self, input: impl Into<LinearInputType>, value: TLinear, )
pub fn unassign_linear(&mut self, input: impl Into<LinearInputType>)
pub fn get_linear(&self, input: impl Into<LinearInputType>) -> Option<&TLinear>
pub fn assign_vector( &mut self, input: impl Into<VectorInputType>, value: TVector, )
pub fn unassign_vector(&mut self, input: impl Into<VectorInputType>)
pub fn get_vector(&self, input: impl Into<VectorInputType>) -> Option<&TVector>
Source§impl<'a, TLinear: Deserialize<'a>, TVector: Deserialize<'a>> InputMap<TLinear, TVector>
impl<'a, TLinear: Deserialize<'a>, TVector: Deserialize<'a>> InputMap<TLinear, TVector>
pub fn deserialize(s: &'a str) -> Result<Self, Error>
Auto Trait Implementations§
impl<TLinear, TVector> Freeze for InputMap<TLinear, TVector>
impl<TLinear, TVector> RefUnwindSafe for InputMap<TLinear, TVector>where
TLinear: RefUnwindSafe,
TVector: RefUnwindSafe,
impl<TLinear, TVector> Send for InputMap<TLinear, TVector>
impl<TLinear, TVector> Sync for InputMap<TLinear, TVector>
impl<TLinear, TVector> Unpin for InputMap<TLinear, TVector>
impl<TLinear, TVector> UnwindSafe for InputMap<TLinear, TVector>where
TLinear: UnwindSafe,
TVector: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.