Struct toml_edit::Document
[−]
[src]
pub struct Document {
pub root: Item,
// some fields omitted
}Type representing a TOML document
Fields
root: Item
Root should always be Item::Table.
Methods
impl Document[src]
fn new() -> Self[src]
Creates an empty document
fn as_table(&self) -> &Table[src]
Returns a reference to the root table.
fn as_table_mut(&mut self) -> &mut Table[src]
Returns a mutable reference to the root table.
fn iter(&self) -> Iter[src]
Returns an iterator over the root table.
Trait Implementations
impl Display for Document[src]
fn fmt(&self, f: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl Debug for Document[src]
impl Clone for Document[src]
fn clone(&self) -> Document[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Default for Document[src]
impl FromStr for Document[src]
type Err = TomlError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>[src]
Parses a document from a &str
impl<'s> Index<&'s str> for Document[src]
type Output = Item
The returned type after indexing.
fn index(&self, key: &'s str) -> &Item[src]
Performs the indexing (container[index]) operation.