Skip to main content

PlatformTextInputHandler

Trait PlatformTextInputHandler 

Source
pub trait PlatformTextInputHandler {
    // Required methods
    fn show_keyboard(&self);
    fn hide_keyboard(&self);
}
Expand description

Callbacks a platform installs to control its on-screen keyboard.

Implementations must be idempotent: show_keyboard may be invoked while the keyboard is already visible (every tap on a text field re-requests it) and hide_keyboard may race a keyboard the user already dismissed.

Required Methods§

Source

fn show_keyboard(&self)

A text field gained focus; the platform should show its soft keyboard.

Source

fn hide_keyboard(&self)

No text field is focused anymore; the platform should hide its soft keyboard.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§