Module tpnote_lib::content

source ·
Expand description

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

Structs

  • Pointers belonging to the self referential struct Content.
  • Holds the notes content in a string and two string slices header and body. This struct is self referencial. 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

  • Provides cheap access to the header with header(), the body with body(), and the whole raw text with as_str().