Expand description
This submodule contains useful functions and other constructs that don’t sensibly belong to any specific entity in the program.
Copyright © 2020 Santtu Söderholm
Enums§
- Aplus
Active Element Clear - The variant “both” forces the element to a new line, “left” (“right”) allows no floating elements on the left (right)
- Aplus
Active Element Input Type - Use “file” for file inputs, “clickable” for clickable inputs, and “dropdown” for dropdown. For dropdowns, the available options should be listed after the type indicating “dropdown” in this format: “dropdown:option1,option2,option3”
- Aplus
Active Element Output Type - Default type is text; for image (png) outputs use “image”
- Aplus
Exercise Status - There are 6 possible statuses for A+ exercises:
- Aplus
Questionnaire Type - An enumeration fo the different A+ questionnaire types. This is used the differentiate between questionnaire hint output formats, among other things.
- Aplus
Radar Tokenizer - An enumeration of the different tokenizers offered by the A+ Radar tokenizer.
- Enum
Delims - Enumerated list item labels can either end with a period
.or a right parenthesis). A third option is to enclose them in matching parentheses(and). - Enum
Kind - List enumerator labels can be Arabic numerals, lower- or upper-case alphet
a--zorA--Z, or lower- or upper-case Roman numerals between1--4999. - Footnote
Kind - There are 4 different kinds of footnote markers:
- HTML
Alignment - An enumeration of the (deprecated) “align” attribute alternatives
recognized by the HTML
<img>tag. - Horizontal
Alignment - An enumeration of different horizontal alignment options:
Left,MiddleorRight. - Interpreted
Text Kind - There are 3 types of interpreted inline text, such as math:
- Length
- Units of length recognized by reStructuredText.
- Link
Target - A hyperlink target may be one of 3 types:
- Metric
Type - An enumeration of how lengths can be interpreted. This includes precentages of current context and absolute length
- Output
Stream - An enumeration of the different writer output formats. Currently stdout and files are supported.
- Parsing
Result - An enumeration of the different ways a (nested) parsing session might terminate.
The return type of the
Parser::parsemethod. Generally, finishing conditions that are not outright failures will enclose the document tree fed to the parser when it was initialized. - Reference
- An enumeration of the different types of references that a reference node might contain.
- Section
Line Style - A section can be underlined, or over- and underlined with a certain character.
- Table
ColWidths - An enumeration of different horizontal alignment options.
- ToCBacklinks
- An enumeration of different backlinking alternatives for a table of contents node. Instructs the doctree to generate links from section headers back to the table of contents entries, the table of contents itself, or generate no backlinks.
- Traversal
Type - Enumerated the types of tree traversals that one of the
DocTreewalk methods might perform.
Constants§
- FOOTNOTE_
SYMBOLS - The standard Docutils system uses these symbols as footnote marks when a FootnoteKind::AutoSymbol is detected. They are, from first to last:
- SECTION_
AND_ QUOTING_ CHARS - These are the characters that can be used in underlining section titles, marking the lines of literal text blocks and creating transitions.
Functions§
- normalize_
refname - Normalizes the given
&straccording to the reStructuredText specification. In this context, normalization means converting any contiguous whitespace into a single ASCII space character and converting letters to their lower-case variants. - read_
path_ lines - Read the lines of a given file into a buffer.
- str_
to_ lines - Returns a
Vec<String>from a given&str, split at new lines\nor\r\n. - strip_
indent - A whitespace-aware function for stripping indentation
from
Strings. ReturnsOk(String)if successful. If non-whitespace characters are encountered before the notifiedamounthas been stripped, anErr(message)is returned instead.
Type Aliases§
- Enum
AsInt - A type alias for different kinds of enumerators such as list or foonote ordinals in integer format.
- Length
Num - A type alias for the number type used in the
Lengthenum. - NodeId
- A type alias for an integer used as a node identifier.
- Quiz
Points - A type alias for question points.