Struct nominals::RomanUpper
source · pub struct RomanUpper;
Expand description
Uppercase 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, RomanUpper};
assert_eq!(4000_u32.to_nominal(&RomanUpper), "I̅V̅");
assert_eq!(4_001_u32.to_nominal(&RomanUpper), "I̅V̅I");
assert_eq!(2_000_000_u32.to_nominal(&RomanUpper), "M̅M̅");
RomanUpper
# | RomanUpper |
---|---|
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 RomanUpper
impl<T> NominalSystem<T> for RomanUpper
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 RomanUpper
impl Send for RomanUpper
impl Sync for RomanUpper
impl Unpin for RomanUpper
impl UnwindSafe for RomanUpper
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