use super::*;
use icu_locid::extensions::unicode::Key;
use icu_locid::subtags::{region, script, Language, Region, Script};
use icu_provider::prelude::*;
use zerovec::ule::UnvalidatedStr;
use zerovec::ZeroMap;
use zerovec::ZeroMap2d;
#[icu_provider::data_struct(marker(
LocaleFallbackLikelySubtagsV1Marker,
"fallback/likelysubtags@1",
singleton
))]
#[derive(Default, Clone, PartialEq, Debug)]
#[cfg_attr(
feature = "datagen",
derive(serde::Serialize, databake::Bake),
databake(path = icu_locid_transform::provider),
)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
#[yoke(prove_covariance_manually)]
pub struct LocaleFallbackLikelySubtagsV1<'data> {
#[cfg_attr(feature = "serde", serde(borrow))]
pub l2s: ZeroMap<'data, UnvalidatedLanguage, Script>,
#[cfg_attr(feature = "serde", serde(borrow))]
pub lr2s: ZeroMap2d<'data, UnvalidatedLanguage, UnvalidatedRegion, Script>,
#[cfg_attr(feature = "serde", serde(borrow))]
pub l2r: ZeroMap<'data, UnvalidatedLanguage, Region>,
#[cfg_attr(feature = "serde", serde(borrow))]
pub ls2r: ZeroMap2d<'data, UnvalidatedLanguage, UnvalidatedScript, Region>,
}
pub const DEFAULT_SCRIPT: Script = script!("Latn");
pub const DEFAULT_REGION: Region = region!("ZZ");
#[icu_provider::data_struct(marker(
LocaleFallbackParentsV1Marker,
"fallback/parents@1",
singleton
))]
#[derive(Default, Clone, PartialEq, Debug)]
#[cfg_attr(
feature = "datagen",
derive(serde::Serialize, databake::Bake),
databake(path = icu_locid_transform::provider),
)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
#[yoke(prove_covariance_manually)]
pub struct LocaleFallbackParentsV1<'data> {
#[cfg_attr(feature = "serde", serde(borrow))]
pub parents: ZeroMap<'data, UnvalidatedStr, (Language, Option<Script>, Option<Region>)>,
}
#[icu_provider::data_struct(marker(
CollationFallbackSupplementV1Marker,
"fallback/supplement/co@1",
singleton,
))]
#[derive(Default, Clone, PartialEq, Debug)]
#[cfg_attr(
feature = "datagen",
derive(serde::Serialize, databake::Bake),
databake(path = icu_locid_transform::provider),
)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
#[yoke(prove_covariance_manually)]
pub struct LocaleFallbackSupplementV1<'data> {
#[cfg_attr(feature = "serde", serde(borrow))]
pub parents: ZeroMap<'data, UnvalidatedStr, (Language, Option<Script>, Option<Region>)>,
#[cfg_attr(feature = "serde", serde(borrow))]
pub unicode_extension_defaults: ZeroMap2d<'data, Key, UnvalidatedStr, UnvalidatedStr>,
}