pub struct Filter { /* fields omitted */ }
Represents a HashMap from VirtualKeyCode to character. Used to filter out which characters get registered by the textinput.
Use Filter::empty_filter()
to create a new filter and for example .with_basic_latin_characters
to add basic latin characters to the filter.
Use .with_pair
or insert
to create your own filters.
Create an empty filter, where other filters can be added, such as basic_latin_keycode_filter
Creates a Filter with basic latin characters
Includes characters a-z and spacebar.
Creates a Filter with basic numerals
Includes numerals from 0-9
Creates a Filter with basic special symbols
Includes '
, \
, :
, .
, ;
, ,
, =
, -
, *
, _
, /
, [
, ]
Unfortunately VirtualKeyCode doesn't seem to support other special characters currently.
Add a specific VirtualKeyCode: char pair to this filter and return the current filter.
This would mean that when you press the keycode, the character specified will be typed.
Insert a specific VirtualKeyCode: char pair to this filter.
Works similarly to with_pair
Get the character from the specified VirtualKeyCode, None if it doesn't exist.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static