Skip to main content

TextInput

Trait TextInput 

Source
pub trait TextInput {
    // Required methods
    fn open(&mut self, ask: &TextAsk) -> bool;
    fn poll(&mut self) -> Option<TextAnswer>;
}
Expand description

A system keyboard a backend offers (Platform::text_input).

Required Methods§

Source

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>

What the player did, once they closed the keyboard; None while it is open, or when none is.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§