Struct nominals::RomanLower
source · pub struct RomanLower;
Expand description
Lowercase Roman numerals.
This encoding utilizes Vinculum notation for numbers 4,000 and above. This notation uses an overline over a repeated set of symbols. A few examples:
use nominals::{Nominal, RomanLower};
assert_eq!(4_000_u32.to_nominal(&RomanLower), "i̅v̅");
assert_eq!(4_001_u32.to_nominal(&RomanLower), "i̅v̅i");
assert_eq!(2_000_000_u32.to_nominal(&RomanLower), "m̅m̅");
RomanLower
# | RomanLower |
---|---|
1 | i |
2 | ii |
3 | iii |
4 | iv |
5 | v |
6 | vi |
… | … |
9 | ix |
10 | x |
11 | xi |
… | … |
3999 | mmmcmxcix |
4000 | i̅v̅ |
4001 | i̅v̅i |
… | … |
999999 | d̅m̅l̅c̅i̅x̅cmxcix |
1000000 | m̅ |
1000001 | m̅i |
Trait Implementations§
source§impl<T> NominalSystem<T> for RomanLower
impl<T> NominalSystem<T> for RomanLower
source§fn try_format_nominal(&self, nominal: T) -> Result<NominalString, Error<T>>
fn try_format_nominal(&self, nominal: T) -> Result<NominalString, Error<T>>
Tries to format
nominal
using this system. Read moresource§fn format_nominal(&self, nominal: T) -> NominalString
fn format_nominal(&self, nominal: T) -> NominalString
Formats
nominal
using this system.Auto Trait Implementations§
impl RefUnwindSafe for RomanLower
impl Send for RomanLower
impl Sync for RomanLower
impl Unpin for RomanLower
impl UnwindSafe for RomanLower
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