Skip to main content

PlatformKeyboardLayout

Trait PlatformKeyboardLayout 

Source
pub trait PlatformKeyboardLayout {
    // Required methods
    fn id(&self) -> &str;
    fn name(&self) -> &str;
}
Expand description

The keyboard layout that is currently active on a platform.

Each platform implements this to describe its active keyboard layout. The identifier and name are whatever the platform reports.

Required Methods§

Source

fn id(&self) -> &str

Returns the layout’s identifier. It is unique to the layout, so compare identifiers to detect a change.

Source

fn name(&self) -> &str

Returns the layout’s name for display, such as U.S..

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§