#![allow(clippy::exhaustive_structs, clippy::exhaustive_enums)]
use icu_collections::char16trie::Char16Trie;
use icu_collections::codepointtrie::CodePointTrie;
use icu_provider::prelude::*;
use zerovec::ZeroVec;
#[cfg(feature = "compiled_data")]
#[derive(Debug)]
pub struct Baked;
#[cfg(feature = "compiled_data")]
#[allow(unused_imports)]
const _: () = {
use icu_normalizer_data::*;
pub mod icu {
pub use crate as normalizer;
pub use icu_collections as collections;
}
make_provider!(Baked);
impl_normalizer_nfc_v1!(Baked);
impl_normalizer_nfd_data_v1!(Baked);
impl_normalizer_nfd_supplement_v1!(Baked);
impl_normalizer_nfd_tables_v1!(Baked);
impl_normalizer_nfkd_data_v1!(Baked);
impl_normalizer_nfkd_tables_v1!(Baked);
impl_normalizer_uts46_data_v1!(Baked);
};
icu_provider::data_marker!(
NormalizerNfdDataV1,
"normalizer/nfd/data/v1",
DecompositionData<'static>,
is_singleton = true
);
icu_provider::data_marker!(
NormalizerNfdTablesV1,
"normalizer/nfd/tables/v1",
DecompositionTables<'static>,
is_singleton = true
);
icu_provider::data_marker!(
NormalizerNfkdDataV1,
"normalizer/nfkd/data/v1",
DecompositionData<'static>,
is_singleton = true
);
icu_provider::data_marker!(
NormalizerNfkdTablesV1,
"normalizer/nfkd/tables/v1",
DecompositionTables<'static>,
is_singleton = true
);
icu_provider::data_marker!(
NormalizerUts46DataV1,
"normalizer/uts46/data/v1",
DecompositionData<'static>,
is_singleton = true
);
icu_provider::data_marker!(
NormalizerNfcV1,
"normalizer/nfc/v1",
CanonicalCompositions<'static>,
is_singleton = true
);
icu_provider::data_marker!(
NormalizerNfdSupplementV1,
"normalizer/nfd/supplement/v1",
NonRecursiveDecompositionSupplement<'static>,
is_singleton = true
);
#[cfg(feature = "datagen")]
pub const MARKERS: &[DataMarkerInfo] = &[
NormalizerNfcV1::INFO,
NormalizerNfdDataV1::INFO,
NormalizerNfdTablesV1::INFO,
NormalizerNfkdDataV1::INFO,
NormalizerNfkdTablesV1::INFO,
NormalizerNfdSupplementV1::INFO,
NormalizerUts46DataV1::INFO,
];
#[derive(Debug, PartialEq, Clone, yoke::Yokeable, zerofrom::ZeroFrom)]
#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))]
#[cfg_attr(feature = "datagen", databake(path = icu_normalizer::provider))]
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
pub struct DecompositionData<'data> {
#[cfg_attr(feature = "serde", serde(borrow))]
pub trie: CodePointTrie<'data, u32>,
pub passthrough_cap: u16,
}
icu_provider::data_struct!(
DecompositionData<'_>,
#[cfg(feature = "datagen")]
);
#[derive(Debug, PartialEq, Clone, yoke::Yokeable, zerofrom::ZeroFrom)]
#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))]
#[cfg_attr(feature = "datagen", databake(path = icu_normalizer::provider))]
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
pub struct DecompositionTables<'data> {
#[cfg_attr(feature = "serde", serde(borrow))]
pub scalars16: ZeroVec<'data, u16>,
#[cfg_attr(feature = "serde", serde(borrow))]
pub scalars24: ZeroVec<'data, char>,
}
icu_provider::data_struct!(
DecompositionTables<'_>,
#[cfg(feature = "datagen")]
);
#[derive(Debug, PartialEq, Clone, yoke::Yokeable, zerofrom::ZeroFrom)]
#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))]
#[cfg_attr(feature = "datagen", databake(path = icu_normalizer::provider))]
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
pub struct CanonicalCompositions<'data> {
#[cfg_attr(feature = "serde", serde(borrow))]
pub canonical_compositions: Char16Trie<'data>,
}
icu_provider::data_struct!(
CanonicalCompositions<'_>,
#[cfg(feature = "datagen")]
);
#[derive(Debug, PartialEq, Clone, yoke::Yokeable, zerofrom::ZeroFrom)]
#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))]
#[cfg_attr(feature = "datagen", databake(path = icu_normalizer::provider))]
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
pub struct NonRecursiveDecompositionSupplement<'data> {
#[cfg_attr(feature = "serde", serde(borrow))]
pub trie: CodePointTrie<'data, u32>,
#[cfg_attr(feature = "serde", serde(borrow))]
pub scalars24: ZeroVec<'data, char>,
}
icu_provider::data_struct!(
NonRecursiveDecompositionSupplement<'_>,
#[cfg(feature = "datagen")]
);