pub struct LocaleId {
pub id: String,
}Expand description
Typed identifier for a single Locale, which is a set of internationalization-related properties.
Most APIs that consume locales will probably want to accept a vector of locales to account for priority.
Fields§
§id: StringUnicode BCP-47 Locale Identifier (http://www.unicode.org/reports/tr35/#BCP_47_Conformance).
Must be canonicalized and well-formed. This field should not be populated from arbitrary user- or third-party input, but instead generated programmatically.
Includes language, region, script, and variant, plus Unicode extensions (under the “u” singleton). Other extensions are allowed but ignored.
Examples: “en-US” American English “fr-u-hc-h12” French, with 12-hour clock “ar-EG-u-fw-mon-nu-latn” Egyptian Arabic with “Latin” numerals and first day of week on Monday
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<LocaleId, D> for LocaleId
impl<D: ResourceDialect> Decode<LocaleId, D> for LocaleId
Source§impl<D: ResourceDialect, T0: Encode<UnboundedString, D>> Encode<LocaleId, D> for (T0,)
impl<D: ResourceDialect, T0: Encode<UnboundedString, D>> Encode<LocaleId, D> for (T0,)
Source§impl Ord for LocaleId
impl Ord for LocaleId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for LocaleId
impl PartialOrd for LocaleId
Source§impl TypeMarker for LocaleId
impl TypeMarker for LocaleId
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned to a single memcpy.