pub enum Source {
Mouse(Mouse),
Keyboard(Key),
Gamepad(GamepadKind, Gamepad),
}
Expand description
Enumeration containing all the possible input sources across all kinds of devices.
Variants§
Implementations§
Source§impl Source
impl Source
Sourcepub fn device_kind(&self) -> Kind
pub fn device_kind(&self) -> Kind
Returns the kind of device that the source is (mouse, keyboard, gamepad).
Sourcepub fn bound(self) -> Binding
pub fn bound(self) -> Binding
Converts the Source into a Binding with default properties/modifiers.
Sourcepub fn with_modifier(self, modifier: f32) -> Binding
pub fn with_modifier(self, modifier: f32) -> Binding
Converts the Source into a Binding with a provided value modifier.
Trait Implementations§
impl Copy for Source
impl Eq for Source
impl StructuralPartialEq for Source
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
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