#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub struct PluralRulesOptions {
pub rule_type: Option<PluralRuleType>,
}
impl Default for PluralRulesOptions {
fn default() -> Self {
Self::default()
}
}
impl PluralRulesOptions {
pub const fn default() -> Self {
Self { rule_type: None }
}
pub const fn with_type(mut self, rule_type: PluralRuleType) -> Self {
self.rule_type = Some(rule_type);
self
}
}
impl From<PluralRuleType> for PluralRulesOptions {
fn from(value: PluralRuleType) -> Self {
Self {
rule_type: Some(value),
}
}
}
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash, Default)]
#[non_exhaustive]
pub enum PluralRuleType {
#[default]
Cardinal,
Ordinal,
}