pub fn keys_from_file<P: AsRef<Path>>(path: P) -> Result<Vec<DataKey>>
Expand description

Parses a file of human-readable key identifiers and returns a list of DataKeys.

Unknown key names are ignored.

Example

keys.txt
list/and@1
list/or@1
build.rs
assert_eq!(
    icu_datagen::keys_from_file("keys.txt")?,
    vec![
        icu::list::provider::AndListV1Marker::KEY,
        icu::list::provider::OrListV1Marker::KEY,
    ],
);