pub fn select<N: TryInto<PluralOperands>>(
        &self,
        number: N,
    ) -> Result<PluralCategory, &'static str> {
        let ops = number.try_into();
        let pr = self.function;
        match ops {
            Ok(ops) => Ok(pr(&ops)),
            Err(_) => Err("Argument can not be parsed to operands."),
        }
    }
/// Returns a result of the plural category for the given input.
///
/// If the input is not numeric.
///
/// # Examples
/// ```
/// use intl_pluralrules::{PluralRules, PluralRuleType, PluralCategory};
/// use unic_langid::LanguageIdentifier;
///
/// let langid: LanguageIdentifier = "naq".parse().expect("Parsing failed.");
/// let pr_naq = PluralRules::create(langid, PluralRuleType::CARDINAL).unwrap();
/// assert_eq!(pr_naq.select(1), Ok(PluralCategory::ONE));
/// assert_eq!(pr_naq.select(2), Ok(PluralCategory::TWO));
/// assert_eq!(pr_naq.select(5), Ok(PluralCategory::OTHER));
/// ```
Returns a result of the plural category for the given input.
If the input is not numeric.
Returns a result of the plural category for the given input . If the input is not numeric .
pub fn select<N: TryInto<PluralOperands>>(
        &self,
        number: N,
    ) -> Result<PluralCategory, &'static str> {
        let ops = number.try_into();
        let pr = self.function;
        match ops {
            Ok(ops) => Ok(pr(&ops)),
            Err(_) => Err("Argument can not be parsed to operands."),
        }
    }
pub fn select < N : TryInto < PluralOperands > > ( & self , number : N , ) -> Result < PluralCategory , & ' static str > { let ops = number . try_into ( ) ; let pr = self . function ; match ops { Ok ( ops ) => Ok ( pr ( & ops ) ) , Err ( _ ) => Err ( " " ) , } }
Returns a result of the plural category for the given input.
Returns a result of the plural category for the given input .
&self
number
N
&self
number
N
examples
```
use intl_pluralrules::{PluralRules, PluralRuleType, PluralCategory};
use unic_langid::LanguageIdentifier.

let langid: LanguageIdentifier = "naq".parse().expect("Parsing failed.");
let pr_naq = PluralRules::create(langid, PluralRuleType::CARDINAL).unwrap();
assert_eq!(pr_naq.select(1), Ok(PluralCategory::ONE));
assert_eq!(pr_naq.select(2), Ok(PluralCategory::TWO));
assert_eq!(pr_naq.select(5), Ok(PluralCategory::OTHER));
```
` ` ` use intl_pluralrules :: { PluralRules PluralRuleType PluralCategory } ; use unic_langid :: LanguageIdentifier . let langid : LanguageIdentifier = " naq " . parse () . expect ( " Parsing failed . " ) ; let pr_naq = PluralRules :: create ( langid PluralRuleType :: CARDINAL ) . unwrap () ; assert_eq! ( pr_naq . select ( 1 ) Ok ( PluralCategory :: ONE )) ; assert_eq! ( pr_naq . select ( 2 ) Ok ( PluralCategory :: TWO )) ; assert_eq! ( pr_naq . select ( 5 ) Ok ( PluralCategory :: OTHER )) ; ` ` `