pub enum LabelStyle {
Decimal,
RomanUpper,
RomanLower,
LettersUpper,
LettersLower,
}Expand description
A page-numbering style, the /S of a page label dictionary (Table 159).
Covers ISO 32000-1 §12.4.2.
Variants§
Decimal
Arabic numerals: 1, 2, 3.
RomanUpper
Uppercase Roman numerals: I, II, III.
RomanLower
Lowercase Roman numerals: i, ii, iii.
LettersUpper
Uppercase letters: A to Z, then AA to ZZ, and so on.
LettersLower
Lowercase letters: a to z, then aa to zz, and so on.
Implementations§
Source§impl LabelStyle
impl LabelStyle
Sourcepub fn from_code(code: &str) -> Option<LabelStyle>
pub fn from_code(code: &str) -> Option<LabelStyle>
The style an /S name selects; None for any other name.
Sourcepub fn numeral(self, n: u32) -> String
pub fn numeral(self, n: u32) -> String
The numeric portion of a label for the number n, which starts at
1: Roman numerals in subtractive form, letters as one letter for 1
to 26 and the same letter repeated once more for every further 26.
The number 0 has no Roman or letter form and gives an empty string.
Covers ISO 32000-1 §12.4.2.
Trait Implementations§
Source§impl Clone for LabelStyle
impl Clone for LabelStyle
Source§fn clone(&self) -> LabelStyle
fn clone(&self) -> LabelStyle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LabelStyle
Source§impl Debug for LabelStyle
impl Debug for LabelStyle
impl Eq for LabelStyle
Source§impl PartialEq for LabelStyle
impl PartialEq for LabelStyle
impl StructuralPartialEq for LabelStyle
Auto Trait Implementations§
impl Freeze for LabelStyle
impl RefUnwindSafe for LabelStyle
impl Send for LabelStyle
impl Sync for LabelStyle
impl Unpin for LabelStyle
impl UnsafeUnpin for LabelStyle
impl UnwindSafe for LabelStyle
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