pub struct Keyboard { /* private fields */ }
Implementations§
source§impl Keyboard
impl Keyboard
pub fn new(setup: KeyboardParams) -> Self
pub fn reset(&mut self)
pub fn advance(&mut self)
pub fn on_key_pressed(&mut self, key: Key)
pub fn on_key_released(&mut self, key: Key)
pub fn on_char(&mut self, c: char)
pub fn is_key_down(&self, key: Key) -> bool
pub fn is_key_press(&self, key: Key) -> bool
pub fn is_key_release(&self, key: Key) -> bool
pub fn is_key_repeat(&self, key: Key) -> bool
pub fn captured_chars(&self) -> &[char]
Auto Trait Implementations§
impl RefUnwindSafe for Keyboard
impl Send for Keyboard
impl Sync for Keyboard
impl Unpin for Keyboard
impl UnwindSafe for Keyboard
Blanket Implementations§
§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 more§fn 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 more§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. Read more§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. Read more