[−][src]Crate locale_types
Idiomatic types for locale identifiers.
This crate provides a Locale
enumeration,
LocaleIdentifier
trait, and a
LocaleString
structure are provided that
may be used to parse and construct locale identifiers in a
standards-conformant manner.
Example
use locale_types::{LocaleIdentifier, LocaleString}; let locale = LocaleString::new("en".to_string()) .with_territory("US".to_string()) .with_code_set("UTF-8".to_string()) .with_modifier("collation=pinyin;currency=CNY".to_string()); println!("{}", locale);
Re-exports
pub use id::LocaleIdentifier; |
pub use string::LocaleString; |
pub use locale::Locale; |
Modules
id | Provides a single trait that describes common structure for local identifiers. |
locale | Provides a layer above the |
string | The |
Enums
LocaleError | Common error type for functions in this crate. |
Type Definitions
LocaleResult | Common result type for functions in this crate. |