[−][src]Struct intl_pluralrules::operands::PluralOperands
A full plural operands representation of a number. See CLDR Plural Rules for complete operands description.
Fields
n: f64Absolute value of input
i: isizeInteger value of input
v: isizeNumber of visible fraction digits with trailing zeros
w: isizeNumber of visible fraction digits without trailing zeros
f: isizeVisible fraction digits with trailing zeros
t: isizeVisible fraction digits without trailing zeros
Methods
impl PluralOperands[src]
pub fn from<S: IntoPluralOperands>(num: S) -> Result<Self, &'static str>[src]
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 PartialEq<PluralOperands> for PluralOperands[src]
fn eq(&self, other: &PluralOperands) -> bool[src]
fn ne(&self, other: &PluralOperands) -> bool[src]
impl Debug for PluralOperands[src]
Auto Trait Implementations
impl Unpin for PluralOperands
impl Sync for PluralOperands
impl Send for PluralOperands
impl UnwindSafe for PluralOperands
impl RefUnwindSafe for PluralOperands
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,