Struct intl_pluralrules::operands::PluralOperands [−][src]
pub struct PluralOperands { pub n: f64, pub i: isize, pub v: isize, pub w: isize, pub f: isize, pub t: isize, }
A full plural operands representation of a number. See CLDR Plural Rules for complete operands description.
Fields
n: f64
Absolute value of input
i: isize
Integer value of input
v: isize
Number of visible fraction digits with trailing zeros
w: isize
Number of visible fraction digits without trailing zeros
f: isize
Visible fraction digits with trailing zeros
t: isize
Visible fraction digits without trailing zeros
Methods
impl PluralOperands
[src]
impl PluralOperands
pub fn from<S: ToString>(num: S) -> Result<Self, &'static str>
[src]
pub fn from<S: ToString>(num: S) -> Result<Self, &'static str>
Given numerical input (as numeric type or reference), returns the PluralOperands representation of the input.
Example
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))
Trait Implementations
impl Debug for PluralOperands
[src]
impl Debug for PluralOperands
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for PluralOperands
[src]
impl PartialEq for PluralOperands
fn eq(&self, other: &PluralOperands) -> bool
[src]
fn eq(&self, other: &PluralOperands) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &PluralOperands) -> bool
[src]
fn ne(&self, other: &PluralOperands) -> bool
This method tests for !=
.
Auto Trait Implementations
impl Send for PluralOperands
impl Send for PluralOperands
impl Sync for PluralOperands
impl Sync for PluralOperands