1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*!
Idiomatic, strictly validated, types for locale identifiers.
This crate provides a _strict_ version of the `LocaleString` structure provided
by the [locale-types](https://github.com/johnstonskj/locale-types) crate. For
each of the fields _language code_, _territory_, and _code set_ the values
passed to the constructors will be validated using the
[locale-codes](https://github.com/johnstonskj/locale-codes) crate to ensure they
are valid identifiers according to the corresponding standards.
## Example
```
use locale_types::LocaleIdentifier;
use locale_strict::StrictLocaleString;
let locale = StrictLocaleString::new("en".to_string()).unwrap()
.with_territory("US".to_string()).unwrap()
.with_code_set("UTF-8".to_string()).unwrap()
.with_modifier("collation=pinyin;currency=CNY".to_string()).unwrap();
println!("{}", locale);
```
*/
// ------------------------------------------------------------------------------------------------
// Public Modules
// ------------------------------------------------------------------------------------------------
pub use StrictLocaleString;