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> 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.impl Eq for LocaleId
impl Persistable for LocaleId
impl StructuralPartialEq for LocaleId
Auto Trait Implementations§
impl Freeze for LocaleId
impl RefUnwindSafe for LocaleId
impl Send for LocaleId
impl Sync for LocaleId
impl Unpin for LocaleId
impl UnwindSafe for LocaleId
Blanket Implementations§
Source§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
Source§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
Source§type MarkerInResultUnion = T
type MarkerInResultUnion = T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]