Available on crate feature
render only.Expand description
Render semantic documents through the ctl-layout widgets.
A Document becomes a tree of widgets, one per block:
Fieldsbecomes a record, andTablea table.- A
Sectionbecomes its heading over its body. - A
Noticeand every paragraph become styled text. - A rule stays a rule, and verbatim text keeps its own lines.
The Theme turns each Role into a style on the way, so the widgets
never see a role. The widgets lay the document out as plain lines of styled
spans. Escape sequences are added only when ctl-term’s encoder writes the
lines.
Structs§
- Render
Options - How a document renders: colour mode, width, theme, and styles.
Enums§
- Frame
- What a table draws around and between its columns.
- Record
Style - How a
Recordof key and value rows is drawn. - RowSeparation
- What separates consecutive rows of a table.
Constants§
- DEFAULT_
COLUMN_ BUFFER helporview - Default cells reserved from an automatically detected terminal width.
- DEFAULT_
COLUMN_ BUFFER_ ENV helporview - The environment variable that sets the automatic-width buffer, in cells,
when the CLI has not:
CTL_CORE_COLUMN_BUFFER. - DEFAULT_
COLUMN_ BUFFER_ ENVS helporview - The ordered list of variables read for the automatic-width buffer, holding
only
DEFAULT_COLUMN_BUFFER_ENV. - DEFAULT_
FALLBACK_ WIDTH - Width used when neither the terminal nor
COLUMNSgives one. - DEFAULT_
LIST_ STYLE_ ENV - The environment variable that sets the table frame when the CLI has not:
CTL_CORE_LIST_STYLE. Its values are theFramenamesgrid,header-rule, andplain. - DEFAULT_
LIST_ STYLE_ ENVS - The ordered list of variables read for the table frame, holding only
DEFAULT_LIST_STYLE_ENV. - DEFAULT_
MINIMUM_ AUTOMATIC_ WIDTH helporview - Default floor for an automatically detected effective width.
- DEFAULT_
RECORD_ STYLE_ ENV - The environment variable that sets the record style when the CLI has not:
CTL_CORE_RECORD_STYLE. Its values are theRecordStylenameskeys-right,keys-left, andboxed. - DEFAULT_
RECORD_ STYLE_ ENVS - The ordered list of variables read for the record style, holding only
DEFAULT_RECORD_STYLE_ENV. - DEFAULT_
ROW_ SEPARATION_ ENV - The environment variable that sets the row separation when the CLI has not:
CTL_CORE_ROW_SEPARATION. Its values are theRowSeparationnamesnone,rule, andblank. - DEFAULT_
ROW_ SEPARATION_ ENVS - The ordered list of variables read for the row separation, holding only
DEFAULT_ROW_SEPARATION_ENV.