pub struct ScriptedKeyboard { /* private fields */ }Expand description
A system keyboard that answers from a script: each time it opens it gives the next answer, at the next poll.
Implementations§
Source§impl ScriptedKeyboard
impl ScriptedKeyboard
Sourcepub fn new(answers: impl IntoIterator<Item = TextAnswer>) -> Self
pub fn new(answers: impl IntoIterator<Item = TextAnswer>) -> Self
A keyboard that answers answers, one per opening, then cancels.
Trait Implementations§
Source§impl Clone for ScriptedKeyboard
impl Clone for ScriptedKeyboard
Source§fn clone(&self) -> ScriptedKeyboard
fn clone(&self) -> ScriptedKeyboard
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScriptedKeyboard
impl Debug for ScriptedKeyboard
Source§impl Default for ScriptedKeyboard
impl Default for ScriptedKeyboard
Source§fn default() -> ScriptedKeyboard
fn default() -> ScriptedKeyboard
Returns the “default value” for a type. Read more
Source§impl TextInput for ScriptedKeyboard
impl TextInput for ScriptedKeyboard
Source§fn open(&mut self, ask: &TextAsk) -> bool
fn open(&mut self, ask: &TextAsk) -> bool
Shows the keyboard for
ask: its prompt, the text to start from and
the most characters. false if it can’t now (the system refused);
the screen then hears TextAnswer::Cancelled.Source§fn poll(&mut self) -> Option<TextAnswer>
fn poll(&mut self) -> Option<TextAnswer>
What the player did, once they closed the keyboard;
None while it
is open, or when none is.Auto Trait Implementations§
impl Freeze for ScriptedKeyboard
impl RefUnwindSafe for ScriptedKeyboard
impl Send for ScriptedKeyboard
impl Sync for ScriptedKeyboard
impl Unpin for ScriptedKeyboard
impl UnsafeUnpin for ScriptedKeyboard
impl UnwindSafe for ScriptedKeyboard
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