#[non_exhaustive]pub enum LayoutSource {
Denise,
Xkb,
File(&'static str),
Unknown(String),
Default,
}Expand description
Where a layout choice came from, for logging what a panel actually picked up.
#[non_exhaustive], because the list of places a system might record its
keyboard grows: this release already added Unknown and
broke every exhaustive match on it. A wildcard arm now means the next one
costs nobody a compile error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Denise
The DENISE_KEYMAP environment variable.
Xkb
XKB_DEFAULT_LAYOUT, as Wayland compositors use.
File(&'static str)
A system configuration file, named here so a wrong guess is traceable.
Unknown(String)
The system asked for a layout there is no table for, so US was used.
Carries what it asked for, because this is the case somebody has to be able to act on: a panel typing US on a machine configured for German is a bug report unless it can say which layout it wanted and did not find. Adding a table is about thirty lines; discovering that one is missing should not require reading the source.
Default
Nothing said, so US.
Trait Implementations§
Source§impl Clone for LayoutSource
impl Clone for LayoutSource
Source§fn clone(&self) -> LayoutSource
fn clone(&self) -> LayoutSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more