[][src]Crate locale_strict

Idiomatic, strictly validated, types for locale identifiers.

This crate provides a strict version of the LocaleString structure provided by the 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 crate to ensure they are valid identifiers according to the corresponding standards.


use locale_types::LocaleIdentifier;
use locale_strict::StrictLocaleString;

let locale = StrictLocaleString::new("en".to_string()).unwrap()
println!("{}", locale);


pub use string::StrictLocaleString;



The StrictLocaleString type provides a LocaleIdentifier that validates that language, territory, and code set identifiers are present in the corresponding standards.