pub struct NestingLevel {
pub bullet_alignment: Option<String>,
pub glyph_format: Option<String>,
pub glyph_symbol: Option<String>,
pub glyph_type: Option<String>,
pub indent_first_line: Option<Dimension>,
pub indent_start: Option<Dimension>,
pub start_number: Option<i32>,
pub text_style: Option<TextStyle>,
}
Expand description
Contains properties describing the look and feel of a list bullet at a given level of nesting.
This type is not used in any activity, and only used as part of another schema.
Fields§
§bullet_alignment: Option<String>
The alignment of the bullet within the space allotted for rendering the bullet.
glyph_format: Option<String>
The format string used by bullets at this level of nesting. The glyph format contains one or more placeholders, and these placeholders are replaced with the appropriate values depending on the glyph_type or glyph_symbol. The placeholders follow the pattern %[nesting_level]
. Furthermore, placeholders can have prefixes and suffixes. Thus, the glyph format follows the pattern %[nesting_level]
. Note that the prefix and suffix are optional and can be arbitrary strings. For example, the glyph format %0.
indicates that the rendered glyph will replace the placeholder with the corresponding glyph for nesting level 0 followed by a period as the suffix. So a list with a glyph type of UPPER_ALPHA and glyph format %0.
at nesting level 0 will result in a list with rendered glyphs A.
B.
C.
The glyph format can contain placeholders for the current nesting level as well as placeholders for parent nesting levels. For example, a list can have a glyph format of %0.
at nesting level 0 and a glyph format of %0.%1.
at nesting level 1. Assuming both nesting levels have DECIMAL glyph types, this would result in a list with rendered glyphs 1.
2.
2.1.
2.2.
3.
For nesting levels that are ordered, the string that replaces a placeholder in the glyph format for a particular paragraph depends on the paragraph’s order within the list.
glyph_symbol: Option<String>
A custom glyph symbol used by bullets when paragraphs at this level of nesting are unordered. The glyph symbol replaces placeholders within the glyph_format. For example, if the glyph_symbol is the solid circle corresponding to Unicode U+25cf code point and the glyph_format is %0
, the rendered glyph would be the solid circle.
glyph_type: Option<String>
The type of glyph used by bullets when paragraphs at this level of nesting are ordered. The glyph type determines the type of glyph used to replace placeholders within the glyph_format when paragraphs at this level of nesting are ordered. For example, if the nesting level is 0, the glyph_format is %0.
and the glyph type is DECIMAL, then the rendered glyph would replace the placeholder %0
in the glyph format with a number corresponding to list item’s order within the list.
indent_first_line: Option<Dimension>
The amount of indentation for the first line of paragraphs at this level of nesting.
indent_start: Option<Dimension>
The amount of indentation for paragraphs at this level of nesting. Applied to the side that corresponds to the start of the text, based on the paragraph’s content direction.
start_number: Option<i32>
The number of the first list item at this nesting level. A value of 0 is treated as a value of 1 for lettered lists and Roman numeral lists. For values of both 0 and 1, lettered and Roman numeral lists will begin at a
and i
respectively. This value is ignored for nesting levels with unordered glyphs.
text_style: Option<TextStyle>
The text style of bullets at this level of nesting.
Trait Implementations§
Source§impl Clone for NestingLevel
impl Clone for NestingLevel
Source§fn clone(&self) -> NestingLevel
fn clone(&self) -> NestingLevel
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for NestingLevel
impl Debug for NestingLevel
Source§impl Default for NestingLevel
impl Default for NestingLevel
Source§fn default() -> NestingLevel
fn default() -> NestingLevel
Source§impl<'de> Deserialize<'de> for NestingLevel
impl<'de> Deserialize<'de> for NestingLevel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for NestingLevel
impl Serialize for NestingLevel
impl Part for NestingLevel
Auto Trait Implementations§
impl Freeze for NestingLevel
impl RefUnwindSafe for NestingLevel
impl Send for NestingLevel
impl Sync for NestingLevel
impl Unpin for NestingLevel
impl UnwindSafe for NestingLevel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more