pub trait TextEvent: Sized {
// Required methods
fn from_text(text: &str, old_event: &Self) -> Option<Self>;
fn text<U, F>(&self, f: F) -> Option<U>
where F: FnMut(&str) -> U;
// Provided method
fn text_args(&self) -> Option<String> { ... }
}Expand description
When receiving text from user, such as typing a character.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.