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.
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
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
Read more
Creates a valid instance of Self
. The specific value does not matter,
since it will be overwritten by decode
.
Decodes an object of type
T
from the decoder’s buffers into
self
.
Read more
Encodes the object into the encoder’s buffers. Any handles stored in the
object are swapped for
Handle::INVALID
.
Read more
Encodes the object into the encoder’s buffers. Any handles stored in the
object are swapped for
Handle::INVALID
.
Read more
Compares and returns the maximum of two values.
Read more
Compares and returns the minimum of two values.
Read more
Restrict a value to a certain interval.
Read more
This method tests for self
and other
values to be equal, and is used
by ==
.
This method tests for !=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
This method returns an ordering between
self
and
other
values if one exists.
Read more
This method tests less than (for
self
and
other
) and is used by the
<
operator.
Read more
This method tests less than or equal to (for
self
and
other
) and is used by the
<=
operator.
Read more
This method tests greater than (for
self
and
other
) and is used by the
>
operator.
Read more
This method tests greater than or equal to (for
self
and
other
) and is used by the
>=
operator.
Read more
The owned Rust type which this FIDL type decodes into.
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of inline_align
.
Returns true if the memory layout of
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 more
Returns true if the memory layout of 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.
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from
&Self::Owned
. There are three cases:
Read more
Cheaply converts from &Self::Owned
to Self::Borrowed
.
The marker type to use when the body is at the top-level.
The marker type to use when the body is nested in a result union.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Encodes the object into the encoder’s buffers. Any handles stored in the
object are swapped for
Handle::INVALID
.
Read more
Encodes the object into the encoder’s buffers. Any handles stored in the
object are swapped for
Handle::INVALID
.
Read more
Returns the argument unchanged.
Instruments this type with the provided [
Span
], returning an
Instrumented
wrapper.
Read more
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer.
Read more
Mutably dereferences the given pointer.
Read more
Drops the object pointed to by the given pointer.
Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.