Skip to main content

Module format_element

Module format_element 

Source

Modules§

document
tag

Structs§

BestFittingVariants
The different variants for this element. The first element is the one that takes up the most space horizontally (the most flat), The last element takes up the least space horizontally (but most horizontal space).
BestFittingVariantsIter
Interned
Width
New-type wrapper for a single-line text unicode width. Mainly to prevent access to the inner value.

Enums§

BestFittingMode
Mode used to determine if any variant (except the most expanded) fits for BestFittingVariants.
FormatElement
Language agnostic IR for formatting source code.
LineMode
PrintMode
TextWidth
The pre-computed unicode width of a text if it is a single-line text or a marker that it is a multiline text if it contains a line feed.

Traits§

FormatElements

Functions§

normalize_newlines
Replace the line terminators matching the provided list with “\n” since its the only line break type supported by the printer