Struct amethyst_input::InputBundle
source · Expand description
Bundle for adding the InputHandler
.
This also adds the Winit EventHandler and the InputEvent
Type parameters
AX: The type used to identify input axes. AC: The type used to identify input actions.
String is appropriate for either of these if you don’t know what to use.
Errors
No errors returned from this bundle.
Implementations
sourceimpl<AX, AC> InputBundle<AX, AC>where
AX: Hash + Eq,
AC: Hash + Eq,
impl<AX, AC> InputBundle<AX, AC>where
AX: Hash + Eq,
AC: Hash + Eq,
sourcepub fn with_bindings(self, bindings: Bindings<AX, AC>) -> Self
pub fn with_bindings(self, bindings: Bindings<AX, AC>) -> Self
Use the provided bindings with the InputHandler
sourcepub fn with_bindings_from_file<P: AsRef<Path>>(
self,
file: P
) -> StdResult<Self, ConfigError>where
AX: DeserializeOwned + Serialize,
AC: DeserializeOwned + Serialize,
pub fn with_bindings_from_file<P: AsRef<Path>>(
self,
file: P
) -> StdResult<Self, ConfigError>where
AX: DeserializeOwned + Serialize,
AC: DeserializeOwned + Serialize,
Load bindings from file
Trait Implementations
Auto Trait Implementations
impl<AX, AC> RefUnwindSafe for InputBundle<AX, AC>where
AC: RefUnwindSafe,
AX: RefUnwindSafe,
impl<AX, AC> Send for InputBundle<AX, AC>where
AC: Send,
AX: Send,
impl<AX, AC> Sync for InputBundle<AX, AC>where
AC: Sync,
AX: Sync,
impl<AX, AC> Unpin for InputBundle<AX, AC>where
AC: Unpin,
AX: Unpin,
impl<AX, AC> UnwindSafe for InputBundle<AX, AC>where
AC: UnwindSafe,
AX: UnwindSafe,
Blanket Implementations
impl<T> Any for Twhere
T: Any,
impl<T> Any for Twhere
T: Any,
fn get_type_id(&self) -> TypeId
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
. Read morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read morefn 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. Read morefn 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. Read moreimpl<T> Pointable for T
impl<T> Pointable for T
impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
Tries to create the default.
fn unwrap_default() -> Self
fn unwrap_default() -> Self
Calls
try_default
and panics on an error case.