[−][src]Module intl_pluralrules::operands
A public AST module for plural rule representations. Plural operands in compliance with CLDR Plural Rules.
See full operands description.
Examples
From int
use intl_pluralrules::operands::*; assert_eq!(Ok(PluralOperands { n: 2_f64, i: 2, v: 0, w: 0, f: 0, t: 0, }), PluralOperands::from(2))
From float
use intl_pluralrules::operands::*; assert_eq!(Ok(PluralOperands { n: 1234.567_f64, i: 1234, v: 3, w: 3, f: 567, t: 567, }), PluralOperands::from("-1234.567"))
From &str
use intl_pluralrules::operands::*; assert_eq!(Ok(PluralOperands { n: 123.45_f64, i: 123, v: 2, w: 2, f: 45, t: 45, }), PluralOperands::from(123.45))
Structs
PluralOperands | A full plural operands representation of a number. See CLDR Plural Rules for complete operands description. |
Traits
IntoPluralOperands | A trait that can be implemented on any type to allow it for passing to |