pub struct Input { /* private fields */ }Implementations§
Source§impl Input
impl Input
pub fn new(actions: Actions, step_us: u32) -> Self
pub fn actions(&self) -> &Actions
pub fn bindings(&self) -> &BindingMap
pub fn set_bindings(&mut self, map: BindingMap)
pub fn edit_bindings<R>( &mut self, edit: impl FnOnce(&mut BindingMap, &Actions) -> R, ) -> R
pub fn set_viewport(&mut self, viewport: Option<Viewport>)
pub fn step_index(&self) -> u64
pub fn step_us(&self) -> u32
pub fn state(&self, id: ActionId) -> ActionState
pub fn action(&self, name: &str) -> ActionState
pub fn states(&self) -> &[ActionState]
pub fn pointer(&self) -> Pointer
pub fn wheel(&self) -> [f32; 2]
pub fn active(&self) -> Active
pub fn last_family(&self) -> Option<Family>
pub fn pads(&self) -> impl Iterator<Item = (PadId, &PadInfo)>
pub fn key_held(&self, key: Key) -> bool
pub fn mouse_held(&self, button: MouseButton) -> bool
pub fn mouse_outside(&self, button: MouseButton) -> bool
pub fn feed(&mut self, event: InputEvent)
pub fn step(&mut self) -> Step
pub fn update(&mut self, backend: &mut impl Backend) -> Step
pub fn prompt(&self, name: &str) -> Vec<Control>
pub fn prompt_family(&self) -> Family
pub fn glyph_style(&self) -> GlyphStyle
pub fn rumble_intensity(&self) -> u8
pub fn set_rumble_intensity(&mut self, percent: u8)
pub fn rumble(&mut self, rumble: Rumble) -> bool
pub fn rumble_pad(&mut self, pad: PadId, rumble: Rumble) -> bool
pub fn start_recording(&mut self)
pub fn begin_replay(&mut self, recording: &Recording)
pub fn stop_recording(&mut self) -> Option<Recording>
pub fn recording(&self) -> Option<&Recording>
pub fn is_recording(&self) -> bool
Auto Trait Implementations§
impl Freeze for Input
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnsafeUnpin for Input
impl UnwindSafe for Input
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.