Expand description
Numerics, a library for converting numbers to their English word readings.
Usage:
use numerics::Numerics;
let converter = Numerics::builder().set_custom_negative_word(Some("minus")).build();
assert_eq!(converter.convert_number(123).unwrap(),
vec!["one".to_string(), "hundred".to_string(), "twenty".to_string(), "three".to_string()]);
Structs§
- Numerics
- Numerics can be configured to convert integer primitives into their respective english word serializations.
- Numerics
Builder - NumericsBuilder lets you configure a Numerics instance.
Enums§
- Numerics
Error - Library errors
Traits§
- AsPrimitive
- A generic interface for casting between machine scalars with the
as
operator, which admits narrowing and precision loss. Implementers of this traitAsPrimitive
should behave like a primitive numeric type (e.g. a newtype around another primitive), and the intended conversion must never fail. - Integer
- Num
- The base trait for numeric types, covering
0
and1
values, comparisons, basic numeric operations, and string conversion. - NumCast
- An interface for casting between machine scalars.
- PrimInt
- Generic trait for primitive integers.
- Signed
AndUnsigned - Signed number operations implemented for both signed and unsigned numbers.
- ToPrimitive
- A generic trait for converting a value to a number.