pub enum PluralCategory {
Zero,
One,
Two,
Few,
Many,
Other,
}Expand description
CLDR plural categories. A language’s Language::plural_category
implementation maps an integer count into one of these six buckets.
The subset a language actually uses depends on its grammar:
- English:
One|Other - Spanish:
One|Other - Polish:
One|Few|Many|Other - Arabic:
Zero|One|Two|Few|Many|Other
Non-English grammars must override Language::plural_category and
Language::pluralize_with_category to return the correct category and
the correct word form for their language.
Variants§
Zero
One
Two
Few
Many
Other
The catch-all category; used by languages that do not distinguish a more specific bucket for a given count.
Trait Implementations§
Source§impl Clone for PluralCategory
impl Clone for PluralCategory
Source§fn clone(&self) -> PluralCategory
fn clone(&self) -> PluralCategory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PluralCategory
impl Debug for PluralCategory
Source§impl Default for PluralCategory
impl Default for PluralCategory
Source§fn default() -> PluralCategory
fn default() -> PluralCategory
Returns the “default value” for a type. Read more
Source§impl PartialEq for PluralCategory
impl PartialEq for PluralCategory
Source§fn eq(&self, other: &PluralCategory) -> bool
fn eq(&self, other: &PluralCategory) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for PluralCategory
impl Eq for PluralCategory
impl StructuralPartialEq for PluralCategory
Auto Trait Implementations§
impl Freeze for PluralCategory
impl RefUnwindSafe for PluralCategory
impl Send for PluralCategory
impl Sync for PluralCategory
impl Unpin for PluralCategory
impl UnsafeUnpin for PluralCategory
impl UnwindSafe for PluralCategory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more