pub struct MainStyle<M> {
pub margin: Option<MarginStyle<M>>,
pub horizontal_char: char,
pub vertical_char: char,
pub top_vertical_char: char,
pub top_corner_char: char,
pub bottom_corner_char: char,
pub spaces_meta: M,
pub text_normal_meta: M,
pub text_alt_meta: M,
}Expand description
The general style of an annotated snippet.
This controls how the snippet and its annotations are drawn (margin, connector lines, corners) and which metadata is attached to each text fragment.
M is an output-backend-defined metadata type (often a “color/style”). It
is passed through to Output.
Fields§
§margin: Option<MarginStyle<M>>The style of the margin.
If None, there will not be any margin at all.
horizontal_char: charCharacter used to draw the horizontal connectors of multi-line annotations.
vertical_char: charCharacter used to draw the vertical connector of multi-line annotations.
top_vertical_char: charCharacter used to draw the top corner of multi-line annotations that start at the first column.
top_corner_char: charCharacter used to draw the top corner of multi-line annotations.
bottom_corner_char: charCharacter used to draw the bottom corner of multi-line annotations.
spaces_meta: MMetadata that accompanies spaces.
This is used for padding and separator spaces inserted by the renderer.
text_normal_meta: MMetadata that accompanies unannotated text.
text_alt_meta: MMetadata that accompanies unannotated alternate text.
“Alternate text” refers to replacement text emitted when the renderer makes normally-invisible or potentially-confusing source elements explicit (for example, certain control characters or invalid UTF-8 sequences, depending on snippet settings).