Module content

Source
Expand description

Self referencing data structures to store the note’s content as a raw string.

Structs§

ContentRef
Pointers belonging to the self referential struct Content.
ContentString
Holds the notes content in a string and two string slices header and body. This struct is self referential. It deals with operating system specific handling of newlines. The content of a note is stored as UTF-8 string with one \n character as newline. If present, a Byte Order Mark BOM is removed while reading with new().

Traits§

Content
This trait represents Tp-Note content. The content is devided into header and body. The header is the YAML meta data describing the body. In some cases the header might be empty, e.g. when the data comes from the clipboard (the txt_clipboard data might come with a header). The body is flat UTF-8 markup formatted text, e.g. in Markdown or in ReStructuredText. A special case is HTML data in the body, originating from the HTML clipboard. Here, the body always starts with an HTML start tag (for details see the html::HtmlStream trait) and the header is always empty.