Expand description
The document behind Tommy Flyleaf: a TOML file edited as a tree, with its comments, key order and formatting kept for everything that was not edited.
No user interface. Everything here is an operation on a toml_edit
document that the widget in flyleaf asks for and never performs itself,
so that there is one place a change goes through.
Re-exports§
pub use toml_edit;
Structs§
- Document
- A TOML document together with what its file looked like.
Enums§
- Error
- Why a file did not become a document, or a document a file.
- Kind
- A kind of value, or a table.
- Newline
- The line ending a file was written with.
Functions§
- add_
inline_ key - Add a key to an inline table.
- add_key
- Add a key to a table.
- comment_
beside - The comment in a decor’s suffix, which is the one beside a value.
- comments_
before - The comment lines in a decor’s prefix, without their
#and the whitespace around each. - convert
- The value as another kind, where it reads as one;
Nonewhere the change would be a guess. - convert_
element - Change the element at an index to another kind, where it reads as one.
- convert_
inline_ key - Change a key’s value in an inline table to another kind, where it reads as one. A table cannot be inside an inline table, so that is refused.
- convert_
key - Change a key’s value to another kind, where it reads as one, keeping its place and its decor.
- push_
element - Add an element of a kind at the end, in the style of the element before it.
- remove_
element - Remove the element at an index.
- remove_
inline_ key - Remove a key from an inline table.
- remove_
key - Remove a key, and everything under it where it is a table.
- rename_
inline_ key - Rename a key in an inline table, keeping its place and its decor.
- rename_
key - Rename a key, keeping its place in the document and the decor it carried.
- set_
comment_ beside - Replace the comment in a decor’s suffix, keeping the space before it, or remove it.
- set_
comments_ before - Replace the comment lines in a decor’s prefix, keeping the blank lines before them and the indentation after them. No lines removes the comment and leaves the whitespace.
- set_
element - Change the element at an index, keeping the decor it was written with.
- set_
trailing_ comments - Replace the comment lines after the last item, keeping the blank lines before them.
- set_
value - Change a value, keeping the decor it was written with.
- trailing_
comments - The comment lines after the last item of a document.