pub struct InputCollection { /* private fields */ }Expand description
Collection of many inputs
Implementations§
Source§impl InputCollection
impl InputCollection
pub fn new() -> Self
Sourcepub fn add_input(&mut self, device: InputDevice)
pub fn add_input(&mut self, device: InputDevice)
Sourcepub fn get_input_arguments(&self, info: &Info) -> InputArguments
pub fn get_input_arguments(&self, info: &Info) -> InputArguments
Distribute all of the inputs in the collection amongst all of the players mentioned in the info argument and return a InputArgument suitable for passing to Game::Step()
§Arguments
info- The game info
Trait Implementations§
Source§impl Clone for InputCollection
impl Clone for InputCollection
Source§fn clone(&self) -> InputCollection
fn clone(&self) -> InputCollection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for InputCollection
impl Default for InputCollection
Source§fn default() -> InputCollection
fn default() -> InputCollection
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for InputCollection
impl<'de> Deserialize<'de> for InputCollection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl InputCombine for InputCollection
impl InputCombine for InputCollection
Source§impl InputConvert for InputCollection
impl InputConvert for InputCollection
fn convert(&self, device_type: InputDeviceType) -> Option<InputDevice>
Auto Trait Implementations§
impl Freeze for InputCollection
impl RefUnwindSafe for InputCollection
impl Send for InputCollection
impl Sync for InputCollection
impl Unpin for InputCollection
impl UnwindSafe for InputCollection
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