pub enum TextPurpose {
Normal,
Password,
Pin,
}Expand description
What a text field taking typing is for, as an input method needs to know it.
Here rather than in crcbl-shell for the reason CursorIcon is: a UI
names it for its field, and a UI crate depends on this one, not on the
shell.
Exhaustive on purpose, as CursorIcon is: a purpose added later
must fail to compile in every backend’s mapping rather than fall to
Normal through a wildcard arm, because a password read
as ordinary text is one an input method may learn and suggest back.
Variants§
Normal
Ordinary text: the input method may complete, correct and remember.
Password
A password: hidden as typed, and nothing typed may be stored, learned or offered back as a suggestion.
Pin
A PIN: digits, hidden, and not stored, as a password.
Implementations§
Source§impl TextPurpose
impl TextPurpose
Sourcepub const fn is_sensitive(self) -> bool
pub const fn is_sensitive(self) -> bool
Whether what is typed must not be stored, learned or suggested.