1#![allow(clippy::unreadable_literal)]
10
11include!(concat!(env!("OUT_DIR"), "/mapping.rs"));
12
13pub fn lookup_by_name(name: &str) -> Option<&'static Record> {
15    BY_NAMES.get(&name).copied()
16}
17
18pub fn lookup_by_codepoint(codepoint: char) -> Option<&'static Record> {
20    BY_CODEPOINT.get(&codepoint).copied()
21}
22
23pub fn lookup_by_keysym(keysym: u32) -> Option<&'static Record> {
25    BY_KEYSYM.get(&keysym).copied()
26}
27
28#[test]
29fn access_works() {
30    assert!(lookup_by_name("Uhorngrave").is_some());
31    assert!(lookup_by_codepoint('\u{1EEA}').is_some());
32    assert!(lookup_by_keysym(0x1eea).is_some());
33}