pub struct Numerics { /* private fields */ }Expand description
Numerics can be configured to convert integer primitives into their respective english word serializations.
Implementations§
Source§impl Numerics
impl Numerics
Sourcepub fn builder() -> NumericsBuilder
pub fn builder() -> NumericsBuilder
Configure a Numerics instance.
Sourcepub fn convert_number<T>(&self, number: T) -> Result<Vec<String>, NumericsError>
pub fn convert_number<T>(&self, number: T) -> Result<Vec<String>, NumericsError>
Convert a number into string.
use numerics::Numerics;
let converter = Numerics::default();
assert_eq!(converter.convert_number(123).unwrap(),
vec!["one".to_string(), "hundred".to_string(), "twenty".to_string(), "three".to_string()]);Auto Trait Implementations§
impl Freeze for Numerics
impl RefUnwindSafe for Numerics
impl Send for Numerics
impl Sync for Numerics
impl Unpin for Numerics
impl UnsafeUnpin for Numerics
impl UnwindSafe for Numerics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more