<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="`toml_edit`"><title>toml_edit - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../static.files/rustdoc-5bc39a1768837dd0.css"><metaname="rustdoc-vars"data-root-path="../"data-static-root-path="../static.files/"data-current-crate="toml_edit"data-themes=""data-resource-suffix=""data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)"data-channel="1.77.0"data-search-js="search-dd67cee4cfa65049.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../static.files/storage-4c98445ec4002617.js"></script><scriptdefersrc="../crates.js"></script><scriptdefersrc="../static.files/main-48f368f3872407c8.js"></script><noscript><linkrel="stylesheet"href="../static.files/noscript-04d5337699b92874.css"></noscript><linkrel="alternate icon"type="image/png"href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../static.files/favicon-2c020d218678b618.svg"></head><bodyclass="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle"title="show sidebar"></button></nav><navclass="sidebar"><divclass="sidebar-crate"><h2><ahref="../toml_edit/index.html">toml_edit</a><spanclass="version">0.22.6</span></h2></div><divclass="sidebar-elems"><ulclass="block">
<main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><divid="sidebar-button"tabindex="-1"><ahref="../toml_edit/all.html"title="show sidebar"></a></div><inputclass="search-input"name="search"aria-label="Run search in the documentation"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"tabindex="-1"><ahref="../help.html"title="help">?</a></div><divid="settings-menu"tabindex="-1"><ahref="../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><sectionid="main-content"class="content"><divclass="main-heading"><h1>Crate <aclass="mod"href="#">toml_edit</a><buttonid="copy-path"title="Copy item path to clipboard"><imgsrc="../static.files/clipboard-7571035ce49a181d.svg"width="19"height="18"alt="Copy item path"></button></h1><spanclass="out-of-band"><aclass="src"href="../src/toml_edit/lib.rs.html#1-133">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><h2id="toml_edit"><aclass="doc-anchor"href="#toml_edit">§</a><code>toml_edit</code></h2>
</div></details><h2id="modules"class="section-header">Modules<ahref="#modules"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="mod"href="de/index.html"title="mod toml_edit::de">de</a></div><divclass="desc docblock-short">Deserializing TOML into Rust structures.</div></li><li><divclass="item-name"><aclass="mod"href="ser/index.html"title="mod toml_edit::ser">ser</a></div><divclass="desc docblock-short">Serializing Rust structures into TOML.</div></li><li><divclass="item-name"><aclass="mod"href="visit/index.html"title="mod toml_edit::visit">visit</a></div><divclass="desc docblock-short">Document tree traversal to walk a shared borrow of a document tree.</div></li><li><divclass="item-name"><aclass="mod"href="visit_mut/index.html"title="mod toml_edit::visit_mut">visit_mut</a></div><divclass="desc docblock-short">Document tree traversal to mutate an exclusive borrow of a document tree in place.</div></li></ul><h2id="structs"class="section-header">Structs<ahref="#structs"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="struct"href="struct.Array.html"title="struct toml_edit::Array">Array</a></div><divclass="desc docblock-short">Type representing a TOML array,
payload of the <code>Value::Array</code> variant’s value</div></li><li><divclass="item-name"><aclass="struct"href="struct.ArrayOfTables.html"title="struct toml_edit::ArrayOfTables">ArrayOfTables</a></div><divclass="desc docblock-short">Type representing a TOML array of tables</div></li><li><divclass="item-name"><aclass="struct"href="struct.Date.html"title="struct toml_edit::Date">Date</a></div><divclass="desc docblock-short">A parsed TOML date value</div></li><li><divclass="item-name"><aclass="struct"href="struct.Datetime.html"title="struct toml_edit::Datetime">Datetime</a></div><divclass="desc docblock-short">A parsed TOML datetime value</div></li><li><divclass="item-name"><aclass="struct"href="struct.DatetimeParseError.html"title="struct toml_edit::DatetimeParseError">DatetimeParseError</a></div><divclass="desc docblock-short">Error returned from parsing a <code>Datetime</code> in the <code>FromStr</code> implementation.</div></li><li><divclass="item-name"><aclass="struct"href="struct.Decor.html"title="struct toml_edit::Decor">Decor</a></div><divclass="desc docblock-short">A prefix and suffix,</div></li><li><divclass="item-name"><aclass="struct"href="struct.Document.html"title="struct toml_edit::Document">Document</a></div><divclass="desc docblock-short">Type representing a TOML document</div></li><li><divclass="item-name"><aclass="struct"href="struct.Formatted.html"title="struct toml_edit::Formatted">Formatted</a></div><divclass="desc docblock-short">A value together with its <code>to_string</code> representation,
including surrounding it whitespaces and comments.</div></li><li><divclass="item-name"><aclass="struct"href="struct.InlineOccupiedEntry.html"title="struct toml_edit::InlineOccupiedEntry">InlineOccupiedEntry</a></div><divclass="desc docblock-short">A view into a single occupied location in a <code>IndexMap</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.InlineTable.html"title="struct toml_edit::InlineTable">InlineTable</a></div><divclass="desc docblock-short">Type representing a TOML inline table,
payload of the <code>Value::InlineTable</code> variant</div></li><li><divclass="item-name"><aclass="struct"href="struct.InlineVacantEntry.html"title="struct toml_edit::InlineVacantEntry">InlineVacantEntry</a></div><divclass="desc docblock-short">A view into a single empty location in a <code>IndexMap</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.InternalString.html"title="struct toml_edit::InternalString">InternalString</a></div><divclass="desc docblock-short">Opaque string storage internal to <code>toml_edit</code></div></li><li><divclass="item-name"><aclass="struct"href="struct.Key.html"title="struct toml_edit::Key">Key</a></div><divclass="desc docblock-short">Key as part of a Key/Value Pair or a table header.</div></li><li><divclass="item-name"><aclass="struct"href="struct.KeyMut.html"title="struct toml_edit::KeyMut">KeyMut</a></div><divclass="desc docblock-short">A mutable reference to a <code>Key</code>’s formatting</div></li><li><divclass="item-name"><aclass="struct"href="struct.OccupiedEntry.html"title="struct toml_edit::OccupiedEntry">OccupiedEntry</a></div><divclass="desc docblock-short">A view into a single occupied location in a <code>IndexMap</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.RawString.html"title="struct toml_edit::RawString">RawString</a></div><divclass="desc docblock-short">Opaque string storage for raw TOML; internal to <code>toml_edit</code></div></li><li><divclass="item-name"><aclass="struct"href="struct.Repr.html"title="struct toml_edit::Repr">Repr</a></div><divclass="desc docblock-short">TOML-encoded value</div></li><li><divclass="item-name"><aclass="struct"href="struct.Table.html"title="struct toml_edit::Table">Table</a></div><divclass="desc docblock-short">Type representing a TOML non-inline table</div></li><li><divclass="item-name"><aclass="struct"href="struct.Time.html"title="struct toml_edit::Time">Time</a></div><divclass="desc docblock-short">A parsed TOML time value</div></li><li><divclass="item-name"><aclass="struct"href="struct.TomlError.html"title="struct toml_edit::TomlError">TomlError</a></div><divclass="desc docblock-short">Type representing a TOML parse error</div></li><li><divclass="item-name"><aclass="struct"href="struct.VacantEntry.html"title="struct toml_edit::VacantEntry">VacantEntry</a></div><divclass="desc docblock-short">A view into a single empty location in a <code>IndexMap</code>.</div></li></ul><h2id="enums"class="section-header">Enums<ahref="#enums"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="enum"href="enum.Entry.html"title="enum toml_edit::Entry">Entry</a></div><divclass="desc docblock-short">A view into a single location in a map, which may be vacant or occupied.</div></li><li><divclass="item-name"><aclass="enum"href="enum.InlineEntry.html"title="enum toml_edit::InlineEntry">InlineEntry</a></div><divclass="desc docblock-short">A view into a single location in a map, which may be vacant or occupied.</div></li><li><divclass="item-name"><aclass="enum"href="enum.Item.html"title="enum toml_edit::Item">Item</a></div><divclass="desc docblock-short">Type representing either a value, a table, an array of tables, or none.</div></li><li><divclass="item-name"><aclass="enum"href="enum.Offset.html"title="enum toml_edit::Offset">Offset</a></div><divclass="desc docblock-short">A parsed TOML time offset</div></li><li><divclass="item-name"><aclass="enum"href="enum.Value.html"title="enum toml_edit::Value">Value</a></div><divclass="desc docblock-short">Representation of a TOML Value (as part of a Key/Value Pair).</div></li></ul><h2id="traits"class="section-header">Traits<ahref="#traits"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="trait"href="trait.TableLike.html"title="trait toml_edit::TableLike">TableLike</a></div><divclass="desc docblock-short">This trait represents either a <code>Table</code>, or an <code>InlineTable</code>.</div></li></ul><h2id="functi