pub struct LocaleFallbackLikelySubtagsV1<'data> {
pub l2s: ZeroMap<'data, UnvalidatedTinyAsciiStr<3>, Script>,
pub lr2s: ZeroMap2d<'data, UnvalidatedTinyAsciiStr<3>, UnvalidatedTinyAsciiStr<3>, Script>,
pub l2r: ZeroMap<'data, UnvalidatedTinyAsciiStr<3>, Region>,
pub ls2r: ZeroMap2d<'data, UnvalidatedTinyAsciiStr<3>, UnvalidatedTinyAsciiStr<4>, Region>,
}
Expand description
Locale fallback rules derived from likely subtags data.
Fields§
§l2s: ZeroMap<'data, UnvalidatedTinyAsciiStr<3>, Script>
Map from language to the default script in that language. Languages whose default script
is Latn
are not included in the map for data size savings.
Example: “zh” defaults to “Hans”, which is in this map.
lr2s: ZeroMap2d<'data, UnvalidatedTinyAsciiStr<3>, UnvalidatedTinyAsciiStr<3>, Script>
Map from language-region pairs to a script. Only populated if the script is different
from the one in l2s
for that language.
Example: “zh-TW” defaults to “Hant”, which is in this map.
l2r: ZeroMap<'data, UnvalidatedTinyAsciiStr<3>, Region>
Map from language to the default region in that language. Languages whose default region
is ZZ
are not included in the map for data size savings.
Example: “zh” defaults to “CN”.
ls2r: ZeroMap2d<'data, UnvalidatedTinyAsciiStr<3>, UnvalidatedTinyAsciiStr<4>, Region>
Map from language-script pairs to a region. Only populated if the region is different
from the one in l2r
for that language.
Example: “zh-Hant” defaults to “TW”.
Trait Implementations§
source§fn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
source§fn clone(&self) -> LocaleFallbackLikelySubtagsV1<'data>
fn clone(&self) -> LocaleFallbackLikelySubtagsV1<'data>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§fn default() -> LocaleFallbackLikelySubtagsV1<'data>
fn default() -> LocaleFallbackLikelySubtagsV1<'data>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§fn eq(&self, other: &LocaleFallbackLikelySubtagsV1<'data>) -> bool
fn eq(&self, other: &LocaleFallbackLikelySubtagsV1<'data>) -> bool
self
and other
values to be equal, and is used
by ==
.§type Output = LocaleFallbackLikelySubtagsV1<'a>
type Output = LocaleFallbackLikelySubtagsV1<'a>
Self
with the 'static
replaced with 'a
, i.e. Self<'a>
source§fn transform_owned(self) -> Self::Output
fn transform_owned(self) -> Self::Output
source§unsafe fn make(this: Self::Output) -> Self
unsafe fn make(this: Self::Output) -> Self
Self<'a>
’s lifetime. Read moresource§fn transform_mut<F>(&'a mut self, f: F)where
F: 'static + for<'b> FnOnce(&'b mut Self::Output),
fn transform_mut<F>(&'a mut self, f: F)where F: 'static + for<'b> FnOnce(&'b mut Self::Output),
self
between &'a mut Self<'static>
and &'a mut Self<'a>
,
and pass it to f
. Read moresource§fn zero_from(this: &'zf LocaleFallbackLikelySubtagsV1<'zf_inner>) -> Self
fn zero_from(this: &'zf LocaleFallbackLikelySubtagsV1<'zf_inner>) -> Self
C
into a struct that may retain references into C
.