Skip to main content

Module text

Module text 

Source
Expand description

Text related structures and traits.

Structs§

BasicReader
Reader implementation for byte slices.
BlockReader
Reader implementation for given blocks.
Index
An Index struct holds information about source positions.
Segment
A Segment struct repsents a segment of CommonMark text. In addition to Index, Segment has padding and force_newline fields.

Enums§

Value
An enum represents a string value that can be either an Index or a String. Value does not handle padding and new lines.

Constants§

EOS
Indicates the end of string.

Traits§

Reader
A Reader trait represents a reader that can read and peek bytes.

Functions§

block_to_bytes
Converts a Block to a bytes.
block_to_str
Converts a Block to a str.
block_to_value
Converts a Block to a Value.

Type Aliases§

Block
Special collection of segments. Each segment represents a one line. Each segment does not contain multiple lines.