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: String
Unicode 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> Decode<LocaleId, D> for LocaleIdwhere
D: ResourceDialect,
impl<D> Decode<LocaleId, D> for LocaleIdwhere
D: ResourceDialect,
Source§impl Ord for LocaleId
impl Ord for LocaleId
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.Source§impl ValueTypeMarker for LocaleId
impl ValueTypeMarker for LocaleId
Source§type Borrowed<'a> = &'a LocaleId
type Borrowed<'a> = &'a LocaleId
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreSource§fn borrow(
value: &<LocaleId as TypeMarker>::Owned,
) -> <LocaleId as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<LocaleId as TypeMarker>::Owned, ) -> <LocaleId as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.