<!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="A mutable reference to a `Key`’s formatting"><title>KeyMut in toml_edit - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><linkrel="stylesheet"href="../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../static.files/rustdoc-dd39b87e5fcfba68.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.80.0 (051478957 2024-07-21)"data-channel="1.80.0"data-search-js="search-d52510db62a78183.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../static.files/storage-118b08c4c78b968e.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../static.files/main-20a3ad099b048cf2.js"></script><noscript><linkrel="stylesheet"href="../static.files/noscript-df360f571f6edeae.css"></noscript><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 struct"><!--[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.20</span></h2></div><h2class="location"><ahref="#">KeyMut</a></h2><divclass="sidebar-elems"><section><h3><ahref="#implementations">Methods</a></h3><ulclass="block method"><li><ahref="#method.as_repr">as_repr</a></li><li><ahref="#method.decor">decor</a></li><li><ahref="#method.decor_mut">decor_mut</a></li><li><ahref="#method.default_repr">default_repr</a></li><li><ahref="#method.display_repr">display_repr</a></li><li><ahref="#method.dotted_decor">dotted_decor</a></li><li><ahref="#method.dotted_decor_mut">dotted_decor_mut</a></li><li><ahref="#method.fmt">fmt</a></li><li><ahref="#method.get">get</a></li><li><ahref="#method.leaf_decor">leaf_decor</a></li><li><ahref="#method.leaf_decor_mut">leaf_decor_mut</a></li></ul><h3><ahref="#deref-methods-str">Methods from Deref<Target=str></a></h3><ulclass="block deref-methods"><li><ahref="#method.as_ascii">as_ascii</a></li><li><ahref="#method.as_bytes">as_bytes</a></li><li><ahref="#method.as_ptr">as_ptr</a></li><li><ahref="#method.bytes">bytes</a></li><li><ahref="#method.ceil_char_boundary">ceil_char_boundary</a></li><li><ahref="#method.char_indices">char_indices</a></li><li><ahref="#method.chars">chars</a></li><li><ahref="#method.contains">contains</a></li><li><ahref="#method.encode_utf16">encode_utf16</a></li><li><ahref="#method.ends_with">ends_with</a></li><li><ahref="#method.eq_ignore_ascii_case">eq_ignore_ascii_case</a></li><li><ahref="#method.escape_debug">escape_debug</a></li><li><ahref="#method.escape_default">escape_default</a></li><li><ahref="#method.escape_unicode">escape_unicode</a></li><li><ahref="#method.find">find</a></li><li><ahref="#method.floor_char_boundary">floor_char_boundary</a></li><li><ahref="#method.get-1">get</a></li><li><ahref="#method.get_unchecked">get_unchecked</a></li><li><ahref="#method.is_ascii">is_ascii</a></li><li><ahref="#method.is_char_boundary">is_char_boundary</a></li><li><ahref="#method.is_empty">is_empty</a></li><li><ahref="#method.len">len</a></li><li><ah
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_repr"class="method"><aclass="src rightside"href="../src/toml_edit/key.rs.html#346-348">source</a><h4class="code-header">pub fn <ahref="#method.as_repr"class="fn">as_repr</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="struct"href="struct.Repr.html"title="struct toml_edit::Repr">Repr</a>></h4></section></summary><divclass="docblock"><p>Returns the raw representation, if available.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.default_repr"class="method"><aclass="src rightside"href="../src/toml_edit/key.rs.html#352-354">source</a><h4class="code-header">pub fn <ahref="#method.default_repr"class="fn">default_repr</a>(&self) -><aclass="struct"href="struct.Repr.html"title="struct toml_edit::Repr">Repr</a></h4></section></summary><divclass="docblock"><p>Returns the default raw representation.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.display_repr"class="method"><aclass="src rightside"href="../src/toml_edit/key.rs.html#358-360">source</a><h4class="code-header">pub fn <ahref="#method.display_repr"class="fn">display_repr</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/alloc/borrow/enum.Cow.html"title="enum alloc::borrow::Cow">Cow</a><'_, <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>></h4></section></summary><divclass="docblock"><p>Returns a raw representation.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.decor_mut"class="method"><aclass="src rightside"href="../src/toml_edit/key.rs.html#367-370">source</a><h4class="code-header">pub fn <ahref="#method.decor_mut"class="fn">decor_mut</a>(&mut self) ->&mut <aclass="struct"href="struct.Decor.html"title="struct toml_edit::Decor">Decor</a></h4></section><spanclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span><span>Deprecated since 0.21.1: Replaced with <code>dotted_decor_mut</code>, `leaf_decor_mut</span></div></span></summary><divclass="docblock"><p>Returns the surrounding whitespace</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.leaf_decor_mut"class="method"><aclass="src rightside"href="../src/toml_edit/key.rs.html#373-375">source</a><h4class="code-header">pub fn <ahref="#method.leaf_decor_mut"class="fn">leaf_decor_mut</a>(&mut self) ->&mut <aclass="struct"href="struct.Decor.html"title="struct toml_edit::Decor">Decor</a></h4></section></summary><divclass="docblock"><p>Returns the surrounding whitespace for the line entry</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.dotted_decor_mut"class="method"><aclass="src rightside"href="../src/toml_edit/key.rs.html#378-380">source</a><h4class="code-header">pub fn <ahref="#method.dotted_decor_mut"class="fn">dotted_decor_mut</a>(&mut self) ->&mut <aclass="struct"href="struct.Decor.html"title="struct toml_edit::Decor">Decor</a></h4></section></summary><divclass="docblock"><p>Returns the surrounding whitespace for between dots</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.decor"class="method"><aclass="src rightside"href="../src/toml_edit/key.rs.html#384-387">source</a><h4class="code-header">pub fn <ahref="#method.decor"class="fn">decor</a>(&self) ->&<aclass="struct"href="struct.Decor.html"title="struct toml_edit::Decor">Decor</a></h4></section><spanclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span><span>Deprecated since 0.21.1: Replaced with <code>dotted_decor</code>, `leaf_decor</span></div></span></summary><divclass="docblock"><p>Returns the surrounding whitespace</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.leaf_decor"class="method"><aclass="src rightside"href="../src/toml_edit/key.rs.html#390-392">source</a><h4class="code-header">pub fn <ahref="#method.leaf_decor"class="fn">leaf_decor</a>(&self) ->&<aclass="struct"href="struct.Decor.html"title="struct toml_edit::Decor">Decor</a></h4></section></summary><divclass="docblock"><p>Returns the surrounding whitespace for the line entry</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.dotted_decor"class="method"><aclass="src rightside"href="../src/toml_edit/key.rs.html#395-397">source</a><h4class="code-header">pub fn <ahref="#method.dotted_decor"class="fn">dotted_decor</a>(&self) ->&<aclass="struct"href="struct.Decor.html"title="struct toml_edit::Decor">Decor</a></h4></section></summary><divclass="docblock"><p>Returns the surrounding whitespace for between dots</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.fmt"class="method"><aclass="src rightside"href="../src/toml_edit/key.rs.html#400-402">source</a><h4class="code-header">pub fn <ahref="#method.fmt"class="fn">fmt</a>(&mut self)</h4></section></summary><divclass="docblock"><p>Auto formats the key.</p>
</div></details></div></details></div><h2id="deref-methods-str"class="section-header"><span>Methods from <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/ops/deref/trait.Deref.html"title="trait core::ops::deref::Deref">Deref</a><Target = <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>></span><ahref="#deref-methods-str"class="anchor">§</a></h2><divid="deref-methods-str-1"class="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.len"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#160">source</a></span><h4class="code-header">pub fn <ahref="#method.len"class="fn">len</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Returns the length of <code>self</code>.</p>
<p>This length is in bytes, not <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s or graphemes. In other words,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_empty"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#179">source</a></span><h4class="code-header">pub fn <ahref="#method.is_empty"class="fn">is_empty</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if <code>self</code> has a length of zero bytes.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_char_boundary"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.9.0">1.9.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#209">source</a></span><h4class="code-header">pub fn <ahref="#method.is_char_boundary"class="fn">is_char_boundary</a>(&self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Checks that <code>index</code>-th byte is the first byte in a UTF-8 code point
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.floor_char_boundary"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#256">source</a><h4class="code-header">pub fn <ahref="#method.floor_char_boundary"class="fn">floor_char_boundary</a>(&self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>round_char_boundary</code>)</span></div></span></summary><divclass="docblock"><p>Finds the closest <code>x</code> not exceeding <code>index</code> where <code>is_char_boundary(x)</code> is <code>true</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ceil_char_boundary"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#294">source</a><h4class="code-header">pub fn <ahref="#method.ceil_char_boundary"class="fn">ceil_char_boundary</a>(&self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>round_char_boundary</code>)</span></div></span></summary><divclass="docblock"><p>Finds the closest <code>x</code> not below <code>index</code> where <code>is_char_boundary(x)</code> is <code>true</code>.</p>
<p>This method is the natural complement to <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.floor_char_boundary"title="method str::floor_char_boundary"><code>floor_char_boundary</code></a>. See that method
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_bytes"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#320">source</a></span><h4class="code-header">pub fn <ahref="#method.as_bytes"class="fn">as_bytes</a>(&self) ->&[<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.u8.html">u8</a>] <ahref="#"class="tooltip"data-notable-ty="&[u8]">ⓘ</a></h4></section></summary><divclass="docblock"><p>Converts a string slice to a byte slice. To convert the byte slice back
into a string slice, use the <ahref="https://doc.rust-lang.org/1.80.0/core/str/converts/fn.from_utf8.html"title="fn core::str::converts::from_utf8"><code>from_utf8</code></a> function.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_ptr"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#394">source</a></span><h4class="code-header">pub fn <ahref="#method.as_ptr"class="fn">as_ptr</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.pointer.html">*const </a><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.u8.html">u8</a></h4></section></summary><divclass="docblock"><p>Converts a string slice to a raw pointer.</p>
<ahref="https://doc.rust-lang.org/1.80.0/std/primitive.u8.html"title="primitive u8"><code>u8</code></a>. This pointer will be pointing to the first byte of the string
If you need to mutate the contents of the string slice, use <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.as_mut_ptr"title="method str::as_mut_ptr"><code>as_mut_ptr</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get-1"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.20.0">1.20.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#435">source</a></span><h4class="code-header">pub fn <ahref="#method.get-1"class="fn">get</a><I>(&self, i: I) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<I as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output"title="type core::slice::index::SliceIndex::Output">Output</a>><divclass="where">where
I: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>>,</div></h4></section></summary><divclass="docblock"><p>Returns a subslice of <code>str</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_unchecked"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.20.0">1.20.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#499">source</a></span><h4class="code-header">pub unsafe fn <ahref="#method.get_unchecked"class="fn">get_unchecked</a><I>(&self, i: I) ->&<I as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output"title="type core::slice::index::SliceIndex::Output">Output</a><divclass="where">where
I: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>>,</div></h4></section></summary><divclass="docblock"><p>Returns an unchecked subslice of <code>str</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.slice_unchecked"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#585">source</a></span><h4class="code-header">pub unsafe fn <ahref="#method.slice_unchecked"class="fn">slice_unchecked</a>(&self, begin: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>, end: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a></h4></section><spanclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span><span>Deprecated since 1.29.0: use <code>get_unchecked(begin..end)</code> instead</span></div></span></summary><divclass="docblock"><p>Creates a string slice from another string slice, bypassing safety
alternative see <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html"title="primitive str"><code>str</code></a> and <ahref="https://doc.rust-lang.org/1.80.0/core/ops/index/trait.Index.html"title="trait core::ops::index::Index"><code>Index</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_at"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.4.0">1.4.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#657">source</a></span><h4class="code-header">pub fn <ahref="#method.split_at"class="fn">split_at</a>(&self, mid: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>) -> (&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>)</h4></section></summary><divclass="docblock"><p>Divide one string slice into two at an index.</p>
<p>To get mutable string slices instead, see the <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.split_at_mut"title="method str::split_at_mut"><code>split_at_mut</code></a>
alternative see <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.split_at_checked"title="method str::split_at_checked"><code>split_at_checked</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_at_checked"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.80.0">1.80.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#736">source</a></span><h4class="code-header">pub fn <ahref="#method.split_at_checked"class="fn">split_at_checked</a>(&self, mid: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>)></h4></section></summary><divclass="docblock"><p>Divide one string slice into two at an index.</p>
<p>To get mutable string slices instead, see the <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.split_at_mut_checked"title="method str::split_at_mut_checked"><code>split_at_mut_checked</code></a>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.chars"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#853">source</a></span><h4class="code-header">pub fn <ahref="#method.chars"class="fn">chars</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.Chars.html"title="struct core::str::iter::Chars">Chars</a><'_></h4></section></summary><divclass="docblock"><p>Returns an iterator over the <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s of a string slice.</p>
string slice by <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>. This method returns such an iterator.</p>
<p>It’s important to remember that <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a> represents a Unicode Scalar
<p>Remember, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s might not match your intuition about characters:</p>
<spanclass="macro">assert_eq!</span>(<spanclass="prelude-val">Some</span>(<spanclass="string">'y'</span>), chars.next()); <spanclass="comment">// not 'y̆'
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.char_indices"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#910">source</a></span><h4class="code-header">pub fn <ahref="#method.char_indices"class="fn">char_indices</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.CharIndices.html"title="struct core::str::iter::CharIndices">CharIndices</a><'_></h4></section></summary><divclass="docblock"><p>Returns an iterator over the <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s of a string slice, and their
string slice by <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>. This method returns an iterator of both
these <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, as well as their byte positions.</p>
<p>The iterator yields tuples. The position is first, the <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a> is
<p>Remember, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s might not match your intuition about characters:</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.bytes"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#933">source</a></span><h4class="code-header">pub fn <ahref="#method.bytes"class="fn">bytes</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.Bytes.html"title="struct core::str::iter::Bytes">Bytes</a><'_></h4></section></summary><divclass="docblock"><p>An iterator over the bytes of a string slice.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_whitespace"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.1.0">1.1.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#985">source</a></span><h4class="code-header">pub fn <ahref="#method.split_whitespace"class="fn">split_whitespace</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.SplitWhitespace.html"title="struct core::str::iter::SplitWhitespace">SplitWhitespace</a><'_></h4></section></summary><divclass="docblock"><p>Splits a string slice by whitespace.</p>
instead, use <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.split_ascii_whitespace"title="method str::split_ascii_whitespace"><code>split_ascii_whitespace</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_ascii_whitespace"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.34.0">1.34.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#1034">source</a></span><h4class="code-header">pub fn <ahref="#method.split_ascii_whitespace"class="fn">split_ascii_whitespace</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.SplitAsciiWhitespace.html"title="struct core::str::iter::SplitAsciiWhitespace">SplitAsciiWhitespace</a><'_></h4></section></summary><divclass="docblock"><p>Splits a string slice by ASCII whitespace.</p>
<p>To split by Unicode <code>Whitespace</code> instead, use <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.split_whitespace"title="method str::split_whitespace"><code>split_whitespace</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.lines"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#1092">source</a></span><h4class="code-header">pub fn <ahref="#method.lines"class="fn">lines</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.Lines.html"title="struct core::str::iter::Lines">Lines</a><'_></h4></section></summary><divclass="docblock"><p>An iterator over the lines of a string, as string slices.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.lines_any"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#1105">source</a></span><h4class="code-header">pub fn <ahref="#method.lines_any"class="fn">lines_any</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.LinesAny.html"title="struct core::str::iter::LinesAny">LinesAny</a><'_></h4></section><spanclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span><span>Deprecated since 1.4.0: use lines() instead now</span></div></span></summary><divclass="docblock"><p>An iterator over the lines of a string.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.encode_utf16"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.8.0">1.8.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#1124">source</a></span><h4class="code-header">pub fn <ahref="#method.encode_utf16"class="fn">encode_utf16</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.EncodeUtf16.html"title="struct core::str::iter::EncodeUtf16">EncodeUtf16</a><'_></h4></section></summary><divclass="docblock"><p>Returns an iterator of <code>u16</code> over the string encoded as UTF-16.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.contains"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#1149">source</a></span><h4class="code-header">pub fn <ahref="#method.contains"class="fn">contains</a><'a, P>(&'a self, pat: P) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if the given pattern matches a sub-slice of
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.starts_with"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#1186">source</a></span><h4class="code-header">pub fn <ahref="#method.starts_with"class="fn">starts_with</a><'a, P>(&'a self, pat: P) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if the given pattern matches a prefix of this
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, in which case this function will return true if
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can also be a <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
Look at the second example below regarding behavior for slices of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s.</p>
<P as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if the given pattern matches a suffix of this
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.find"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#1261">source</a></span><h4class="code-header">pub fn <ahref="#method.find"class="fn">find</a><'a, P>(&'a self, pat: P) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns the byte index of the first character of this string slice that
<p>Returns <ahref="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html#variant.None"title="variant core::option::Option::None"><code>None</code></a> if the pattern doesn’t match.</p>
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<P as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns the byte index for the first character of the last match of the pattern in
<p>Returns <ahref="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html#variant.None"title="variant core::option::Option::None"><code>None</code></a> if the pattern doesn’t match.</p>
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#1429">source</a></span><h4class="code-header">pub fn <ahref="#method.split"class="fn">split</a><'a, P>(&'a self, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.Split.html"title="struct core::str::iter::Split">Split</a><'a, P><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over substrings of this string slice, separated by
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<p>The returned iterator will be a <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="trait core::iter::traits::double_ended::DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if the pattern
elements. This is true for, e.g., <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, but not for <code>&str</code>.</p>
from a forward search, the <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.rsplit"title="method str::rsplit"><code>rsplit</code></a> method can be used.</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let </span>v: Vec<<spanclass="kw-2">&</span>str> = <spanclass="string">"Mary had a little lamb"</span>.split(<spanclass="string">' '</span>).collect();
<divclass="example-wrap ignore"><ahref="#"class="tooltip"title="This example is not tested">ⓘ</a><preclass="rust rust-example-rendered"><code><spanclass="macro">assert_eq!</span>(d, <spanclass="kw-2">&</span>[<spanclass="string">"a"</span>, <spanclass="string">"b"</span>, <spanclass="string">"c"</span>]);</code></pre></div>
<p>Use <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.split_whitespace"title="method str::split_whitespace"><code>split_whitespace</code></a> for this behavior.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_inclusive"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.51.0">1.51.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#1469">source</a></span><h4class="code-header">pub fn <ahref="#method.split_inclusive"class="fn">split_inclusive</a><'a, P>(&'a self, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.SplitInclusive.html"title="struct core::str::iter::SplitInclusive">SplitInclusive</a><'a, P><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over substrings of this string slice, separated by
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let </span>v: Vec<<spanclass="kw-2">&</span>str> = <spanclass="string">"Mary had a little lamb\nlittle lamb\nlittle lamb."
<spanclass="macro">assert_eq!</span>(v, [<spanclass="string">"Mary had a little lamb\n"</span>, <spanclass="string">"little lamb\n"</span>, <spanclass="string">"little lamb."</span>]);</code></pre></div>
<p>If the last element of the string is matched,
that element will be considered the terminator of the preceding substring.
That substring will be the last item returned by the iterator.</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let </span>v: Vec<<spanclass="kw-2">&</span>str> = <spanclass="string">"Mary had a little lamb\nlittle lamb\nlittle lamb.\n"
<spanclass="macro">assert_eq!</span>(v, [<spanclass="string">"Mary had a little lamb\n"</span>, <spanclass="string">"little lamb\n"</span>, <spanclass="string">"little lamb.\n"</span>]);</code></pre></div>
<P as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over substrings of the given string slice, separated by
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
search, and it will be a <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="trait core::iter::traits::double_ended::DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if a forward/reverse
<p>For iterating from the front, the <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.split"title="method str::split"><code>split</code></a> method can be used.</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let </span>v: Vec<<spanclass="kw-2">&</span>str> = <spanclass="string">"Mary had a little lamb"</span>.rsplit(<spanclass="string">' '</span>).collect();
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_terminator"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#1573">source</a></span><h4class="code-header">pub fn <ahref="#method.split_terminator"class="fn">split_terminator</a><'a, P>(&'a self, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.SplitTerminator.html"title="struct core::str::iter::SplitTerminator">SplitTerminator</a><'a, P><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over substrings of the given string slice, separated by
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<p>Equivalent to <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.split"title="method str::split"><code>split</code></a>, except that the trailing substring
<p>The returned iterator will be a <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="trait core::iter::traits::double_ended::DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if the pattern
elements. This is true for, e.g., <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, but not for <code>&str</code>.</p>
from a forward search, the <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.rsplit_terminator"title="method str::rsplit_terminator"><code>rsplit_terminator</code></a> method can be used.</p>
<P as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over substrings of <code>self</code>, separated by characters
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<p>Equivalent to <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.split"title="method str::split"><code>split</code></a>, except that the trailing substring is
<p>For iterating from the front, the <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.split_terminator"title="method str::split_terminator"><code>split_terminator</code></a> method can be
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.splitn"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#1674">source</a></span><h4class="code-header">pub fn <ahref="#method.splitn"class="fn">splitn</a><'a, P>(&'a self, n: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.SplitN.html"title="struct core::str::iter::SplitN">SplitN</a><'a, P><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over substrings of the given string slice, separated by a
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<p>If the pattern allows a reverse search, the <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.rsplitn"title="method str::rsplitn"><code>rsplitn</code></a> method can be
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let </span>v: Vec<<spanclass="kw-2">&</span>str> = <spanclass="string">"Mary had a little lambda"</span>.splitn(<spanclass="number">3</span>, <spanclass="string">' '</span>).collect();
<spanclass="macro">assert_eq!</span>(v, [<spanclass="string">"Mary"</span>, <spanclass="string">"had"</span>, <spanclass="string">"a little lambda"</span>]);
<P as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over substrings of this string slice, separated by a
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<p>For splitting from the front, the <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.splitn"title="method str::splitn"><code>splitn</code></a> method can be used.</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let </span>v: Vec<<spanclass="kw-2">&</span>str> = <spanclass="string">"Mary had a little lamb"</span>.rsplitn(<spanclass="number">3</span>, <spanclass="string">' '</span>).collect();
<spanclass="macro">assert_eq!</span>(v, [<spanclass="string">"lamb"</span>, <spanclass="string">"little"</span>, <spanclass="string">"Mary had a"</span>]);
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_once"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.52.0">1.52.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#1743">source</a></span><h4class="code-header">pub fn <ahref="#method.split_once"class="fn">split_once</a><'a, P>(&'a self, delimiter: P) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&'a <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>, &'a <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>)><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Splits the string on the first occurrence of the specified delimiter and
<P as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Splits the string on the last occurrence of the specified delimiter and
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.matches"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.2.0">1.2.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#1801">source</a></span><h4class="code-header">pub fn <ahref="#method.matches"class="fn">matches</a><'a, P>(&'a self, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.Matches.html"title="struct core::str::iter::Matches">Matches</a><'a, P><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over the disjoint matches of a pattern within the given string
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<p>The returned iterator will be a <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="trait core::iter::traits::double_ended::DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if the pattern
elements. This is true for, e.g., <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, but not for <code>&str</code>.</p>
from a forward search, the <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.rmatches"title="method str::rmatches"><code>rmatches</code></a> method can be used.</p>
<P as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over the disjoint matches of a pattern within this string slice,
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
search, and it will be a <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="trait core::iter::traits::double_ended::DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if a forward/reverse
<p>For iterating from the front, the <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.matches"title="method str::matches"><code>matches</code></a> method can be used.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.match_indices"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.5.0">1.5.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#1879">source</a></span><h4class="code-header">pub fn <ahref="#method.match_indices"class="fn">match_indices</a><'a, P>(&'a self, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.MatchIndices.html"title="struct core::str::iter::MatchIndices">MatchIndices</a><'a, P><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over the disjoint matches of a pattern within this string
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<p>The returned iterator will be a <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="trait core::iter::traits::double_ended::DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if the pattern
elements. This is true for, e.g., <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, but not for <code>&str</code>.</p>
from a forward search, the <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.rmatch_indices"title="method str::rmatch_indices"><code>rmatch_indices</code></a> method can be used.</p>
<spanclass="macro">assert_eq!</span>(v, [(<spanclass="number">0</span>, <spanclass="string">"aba"</span>)]); <spanclass="comment">// only the first `aba`</span></code></pre></div>
<P as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over the disjoint matches of a pattern within <code>self</code>,
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
search, and it will be a <ahref="https://doc.rust-lang.org/1.80.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="trait core::iter::traits::double_ended::DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if a forward/reverse
<p>For iterating from the front, the <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.match_indices"title="method str::match_indices"><code>match_indices</code></a> method can be used.</p>
<spanclass="macro">assert_eq!</span>(v, [(<spanclass="number">2</span>, <spanclass="string">"aba"</span>)]); <spanclass="comment">// only the last `aba`</span></code></pre></div>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#1943">source</a></span><h4class="code-header">pub fn <ahref="#method.trim"class="fn">trim</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a></h4></section></summary><divclass="docblock"><p>Returns a string slice with leading and trailing whitespace removed.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_start"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.30.0">1.30.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#1982">source</a></span><h4class="code-header">pub fn <ahref="#method.trim_start"class="fn">trim_start</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a></h4></section></summary><divclass="docblock"><p>Returns a string slice with leading whitespace removed.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_end"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.30.0">1.30.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#2021">source</a></span><h4class="code-header">pub fn <ahref="#method.trim_end"class="fn">trim_end</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a></h4></section></summary><divclass="docblock"><p>Returns a string slice with trailing whitespace removed.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_left"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#2061">source</a></span><h4class="code-header">pub fn <ahref="#method.trim_left"class="fn">trim_left</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a></h4></section><spanclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span><span>Deprecated since 1.33.0: superseded by <code>trim_start</code></span></div></span></summary><divclass="docblock"><p>Returns a string slice with leading whitespace removed.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_right"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#2101">source</a></span><h4class="code-header">pub fn <ahref="#method.trim_right"class="fn">trim_right</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a></h4></section><spanclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span><span>Deprecated since 1.33.0: superseded by <code>trim_end</code></span></div></span></summary><divclass="docblock"><p>Returns a string slice with trailing whitespace removed.</p>
<P as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.DoubleEndedSearcher.html"title="trait core::str::pattern::DoubleEndedSearcher">DoubleEndedSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns a string slice with all prefixes and suffixes that match a
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a function
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="macro">assert_eq!</span>(<spanclass="string">"1foo1barXX"</span>.trim_matches(|c| c == <spanclass="string">'1' </span>|| c == <spanclass="string">'X'</span>), <spanclass="string">"foo1bar"</span>);</code></pre></div>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_start_matches"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.30.0">1.30.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#2181">source</a></span><h4class="code-header">pub fn <ahref="#method.trim_start_matches"class="fn">trim_start_matches</a><'a, P>(&'a self, pat: P) ->&'a <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns a string slice with all prefixes that match a pattern
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.strip_prefix"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.45.0">1.45.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#2214">source</a></span><h4class="code-header">pub fn <ahref="#method.strip_prefix"class="fn">strip_prefix</a><'a, P>(&'a self, prefix: P) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&'a <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns a string slice with the prefix removed.</p>
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<P as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns a string slice with the suffix removed.</p>
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<P as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns a string slice with all suffixes that match a pattern
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="macro">assert_eq!</span>(<spanclass="string">"1fooX"</span>.trim_end_matches(|c| c == <spanclass="string">'1' </span>|| c == <spanclass="string">'X'</span>), <spanclass="string">"1foo"</span>);</code></pre></div>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_left_matches"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#2329">source</a></span><h4class="code-header">pub fn <ahref="#method.trim_left_matches"class="fn">trim_left_matches</a><'a, P>(&'a self, pat: P) ->&'a <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section><spanclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span><span>Deprecated since 1.33.0: superseded by <code>trim_start_matches</code></span></div></span></summary><divclass="docblock"><p>Returns a string slice with all prefixes that match a pattern
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<P as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section><spanclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span><span>Deprecated since 1.33.0: superseded by <code>trim_end_matches</code></span></div></span></summary><divclass="docblock"><p>Returns a string slice with all suffixes that match a pattern
<p>The <ahref="https://doc.rust-lang.org/1.80.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="macro">assert_eq!</span>(<spanclass="string">"1fooX"</span>.trim_right_matches(|c| c == <spanclass="string">'1' </span>|| c == <spanclass="string">'X'</span>), <spanclass="string">"1foo"</span>);</code></pre></div>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.parse"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#2424">source</a></span><h4class="code-header">pub fn <ahref="#method.parse"class="fn">parse</a><F>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><F, <F as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/traits/trait.FromStr.html"title="trait core::str::traits::FromStr">FromStr</a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/str/traits/trait.FromStr.html#associatedtype.Err"title="type core::str::traits::FromStr::Err">Err</a>><divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/traits/trait.FromStr.html"title="trait core::str::traits::FromStr">FromStr</a>,</div></h4></section></summary><divclass="docblock"><p>Parses this string slice into another type.</p>
<p><code>parse</code> can parse into any type that implements the <ahref="https://doc.rust-lang.org/1.80.0/core/str/traits/trait.FromStr.html"title="trait core::str::traits::FromStr"><code>FromStr</code></a> trait.</p>
<p>Will return <ahref="https://doc.rust-lang.org/1.80.0/core/str/traits/trait.FromStr.html#associatedtype.Err"title="associated type core::str::traits::FromStr::Err"><code>Err</code></a> if it’s not possible to parse this string slice into
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_ascii"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.23.0">1.23.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#2443">source</a></span><h4class="code-header">pub fn <ahref="#method.is_ascii"class="fn">is_ascii</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Checks if all characters in this string are within the ASCII range.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_ascii"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#2455">source</a><h4class="code-header">pub fn <ahref="#method.as_ascii"class="fn">as_ascii</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&[<aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/ascii/ascii_char/enum.AsciiChar.html"title="enum core::ascii::ascii_char::AsciiChar">AsciiChar</a>]></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>ascii_char</code>)</span></div></span></summary><divclass="docblock"><p>If this string slice <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.is_ascii"title="method str::is_ascii"><code>is_ascii</code></a>, returns it as a slice
of <ahref="https://doc.rust-lang.org/1.80.0/core/ascii/ascii_char/enum.AsciiChar.html"title="enum core::ascii::ascii_char::AsciiChar">ASCII characters</a>, otherwise returns <code>None</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq_ignore_ascii_case"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.23.0">1.23.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#2475">source</a></span><h4class="code-header">pub fn <ahref="#method.eq_ignore_ascii_case"class="fn">eq_ignore_ascii_case</a>(&self, other: &<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Checks that two strings are an ASCII case-insensitive match.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_ascii_start"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.80.0">1.80.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#2552">source</a></span><h4class="code-header">pub fn <ahref="#method.trim_ascii_start"class="fn">trim_ascii_start</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a></h4></section></summary><divclass="docblock"><p>Returns a string slice with leading ASCII whitespace removed.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_ascii_end"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.80.0">1.80.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#2577">source</a></span><h4class="code-header">pub fn <ahref="#method.trim_ascii_end"class="fn">trim_ascii_end</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a></h4></section></summary><divclass="docblock"><p>Returns a string slice with trailing ASCII whitespace removed.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_ascii"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.80.0">1.80.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#2603">source</a></span><h4class="code-header">pub fn <ahref="#method.trim_ascii"class="fn">trim_ascii</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a></h4></section></summary><divclass="docblock"><p>Returns a string slice with leading and trailing ASCII whitespace
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.escape_debug"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.34.0">1.34.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#2646">source</a></span><h4class="code-header">pub fn <ahref="#method.escape_debug"class="fn">escape_debug</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.EscapeDebug.html"title="struct core::str::iter::EscapeDebug">EscapeDebug</a><'_></h4></section></summary><divclass="docblock"><p>Return an iterator that escapes each char in <code>self</code> with <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html#method.escape_debug"title="method char::escape_debug"><code>char::escape_debug</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.escape_default"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.34.0">1.34.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#2697">source</a></span><h4class="code-header">pub fn <ahref="#method.escape_default"class="fn">escape_default</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.EscapeDefault.html"title="struct core::str::iter::EscapeDefault">EscapeDefault</a><'_></h4></section></summary><divclass="docblock"><p>Return an iterator that escapes each char in <code>self</code> with <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html#method.escape_default"title="method char::escape_default"><code>char::escape_default</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.escape_unicode"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.34.0">1.34.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/str/mod.rs.html#2735">source</a></span><h4class="code-header">pub fn <ahref="#method.escape_unicode"class="fn">escape_unicode</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/str/iter/struct.EscapeUnicode.html"title="struct core::str::iter::EscapeUnicode">EscapeUnicode</a><'_></h4></section></summary><divclass="docblock"><p>Return an iterator that escapes each char in <code>self</code> with <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.char.html#method.escape_unicode"title="method char::escape_unicode"><code>char::escape_unicode</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.replace"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/alloc/str.rs.html#271">source</a></span><h4class="code-header">pub fn <ahref="#method.replace"class="fn">replace</a><'a, P>(&'a self, from: P, to: &<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Replaces all matches of a pattern with another string.</p>
<p><code>replace</code> creates a new <ahref="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a>, and copies the data from this string slice into it.
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let </span>s = <spanclass="string">"this is old"</span>;
<spanclass="macro">assert_eq!</span>(<spanclass="string">"this is new"</span>, s.replace(<spanclass="string">"old"</span>, <spanclass="string">"new"</span>));
<spanclass="macro">assert_eq!</span>(<spanclass="string">"than an old"</span>, s.replace(<spanclass="string">"is"</span>, <spanclass="string">"an"</span>));</code></pre></div>
<p>When the pattern doesn’t match, it returns this string slice as <ahref="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a>:</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.replacen"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.16.0">1.16.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/alloc/str.rs.html#311">source</a></span><h4class="code-header">pub fn <ahref="#method.replacen"class="fn">replacen</a><'a, P>(&'a self, pat: P, to: &<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>, count: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Replaces first N matches of a pattern with another string.</p>
<p><code>replacen</code> creates a new <ahref="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a>, and copies the data from this string slice into it.
<p>When the pattern doesn’t match, it returns this string slice as <ahref="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a>:</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_lowercase"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.2.0">1.2.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/alloc/str.rs.html#368">source</a></span><h4class="code-header">pub fn <ahref="#method.to_lowercase"class="fn">to_lowercase</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></section></summary><divclass="docblock"><p>Returns the lowercase equivalent of this string slice, as a new <ahref="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a>.</p>
the case, this function returns a <ahref="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a> instead of modifying the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_uppercase"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.2.0">1.2.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/alloc/str.rs.html#461">source</a></span><h4class="code-header">pub fn <ahref="#method.to_uppercase"class="fn">to_uppercase</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></section></summary><divclass="docblock"><p>Returns the uppercase equivalent of this string slice, as a new <ahref="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a>.</p>
the case, this function returns a <ahref="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a> instead of modifying the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.repeat"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.16.0">1.16.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/alloc/str.rs.html#531">source</a></span><h4class="code-header">pub fn <ahref="#method.repeat"class="fn">repeat</a>(&self, n: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></section></summary><divclass="docblock"><p>Creates a new <ahref="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a> by repeating a string <code>n</code> times.</p>
<divclass="example-wrap should_panic"><ahref="#"class="tooltip"title="This example panics">ⓘ</a><preclass="rust rust-example-rendered"><code><spanclass="comment">// this will panic at runtime
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_ascii_uppercase"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.23.0">1.23.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/alloc/str.rs.html#561">source</a></span><h4class="code-header">pub fn <ahref="#method.to_ascii_uppercase"class="fn">to_ascii_uppercase</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></section></summary><divclass="docblock"><p>Returns a copy of this string where each character is mapped to its
<p>To uppercase the value in-place, use <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.make_ascii_uppercase"title="method str::make_ascii_uppercase"><code>make_ascii_uppercase</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_ascii_lowercase"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.23.0">1.23.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/alloc/str.rs.html#593">source</a></span><h4class="code-header">pub fn <ahref="#method.to_ascii_lowercase"class="fn">to_ascii_lowercase</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></section></summary><divclass="docblock"><p>Returns a copy of this string where each character is mapped to its
<p>To lowercase the value in-place, use <ahref="https://doc.rust-lang.org/1.80.0/std/primitive.str.html#method.make_ascii_lowercase"title="method str::make_ascii_lowercase"><code>make_ascii_lowercase</code></a>.</p>
Self: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><divclass='docblock'>Feeds a slice of this type into the given <ahref="https://doc.rust-lang.org/1.80.0/core/hash/trait.Hasher.html"title="trait core::hash::Hasher"><code>Hasher</code></a>. <ahref="https://doc.rust-lang.org/1.80.0/core/hash/trait.Hash.html#method.hash_slice">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Ord-for-KeyMut%3C'k%3E"class="impl"><aclass="src rightside"href="../src/toml_edit/key.rs.html#334">source</a><ahref="#impl-Ord-for-KeyMut%3C'k%3E"class="anchor">§</a><h3class="code-header">impl<'k><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a> for <aclass="struct"href="struct.KeyMut.html"title="struct toml_edit::KeyMut">KeyMut</a><'k></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.cmp"class="method trait-impl"><aclass="src rightside"href="../src/toml_edit/key.rs.html#334">source</a><ahref="#method.cmp"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Ord.html#tymethod.cmp"class="fn">cmp</a>(&self, other: &<aclass="struct"href="struct.KeyMut.html"title="struct toml_edit::KeyMut">KeyMut</a><'k>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><divclass='docblock'>This method returns an <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.max"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.21.0">1.21.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/cmp.rs.html#856-858">source</a></span><ahref="#method.max"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Ord.html#method.max"class="fn">max</a>(self, other: Self) -> Self<divclass="where">where
Self: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><divclass='docblock'>Compares and returns the maximum of two values. <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.min"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.21.0">1.21.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/cmp.rs.html#877-879">source</a></span><ahref="#method.min"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Ord.html#method.min"class="fn">min</a>(self, other: Self) -> Self<divclass="where">where
Self: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><divclass='docblock'>Compares and returns the minimum of two values. <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clamp"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.50.0">1.50.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/cmp.rs.html#903-906">source</a></span><ahref="#method.clamp"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Ord.html#method.clamp"class="fn">clamp</a>(self, min: Self, max: Self) -> Self<divclass="where">where
Self: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a> + <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html"title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><divclass='docblock'>Restrict a value to a certain interval. <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq%3C%26str%3E-for-KeyMut%3C's%3E"class="impl"><aclass="src rightside"href="../src/toml_edit/key.rs.html#420-425">source</a><ahref="#impl-PartialEq%3C%26str%3E-for-KeyMut%3C's%3E"class="anchor">§</a><h3class="code-header">impl<'s><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><&'s <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>> for <aclass="struct"href="struct.KeyMut.html"title="struct toml_edit::KeyMut">KeyMut</a><'s></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq-1"class="method trait-impl"><aclass="src rightside"href="../src/toml_edit/key.rs.html#422-424">source</a><ahref="#method.eq-1"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &&<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne-1"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/cmp.rs.html#263">source</a></span><ahref="#method.ne-1"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq%3CString%3E-for-KeyMut%3C's%3E"class="impl"><aclass="src rightside"href="../src/toml_edit/key.rs.html#427-432">source</a><ahref="#impl-PartialEq%3CString%3E-for-KeyMut%3C's%3E"class="anchor">§</a><h3class="code-header">impl<'s><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><<aclass="struct"href="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a>> for <aclass="struct"href="struct.KeyMut.html"title="struct toml_edit::KeyMut">KeyMut</a><'s></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq-2"class="method trait-impl"><aclass="src rightside"href="../src/toml_edit/key.rs.html#429-431">source</a><ahref="#method.eq-2"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &<aclass="struct"href="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne-2"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/cmp.rs.html#263">source</a></span><ahref="#method.ne-2"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq%3Cstr%3E-for-KeyMut%3C's%3E"class="impl"><aclass="src rightside"href="../src/toml_edit/key.rs.html#413-418">source</a><ahref="#impl-PartialEq%3Cstr%3E-for-KeyMut%3C's%3E"class="anchor">§</a><h3class="code-header">impl<'s><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>> for <aclass="struct"href="struct.KeyMut.html"title="struct toml_edit::KeyMut">KeyMut</a><'s></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq"class="method trait-impl"><aclass="src rightside"href="../src/toml_edit/key.rs.html#415-417">source</a><ahref="#method.eq"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/cmp.rs.html#263">source</a></span><ahref="#method.ne"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq-for-KeyMut%3C'k%3E"class="impl"><aclass="src rightside"href="../src/toml_edit/key.rs.html#334">source</a><ahref="#impl-PartialEq-for-KeyMut%3C'k%3E"class="anchor">§</a><h3class="code-header">impl<'k><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a> for <aclass="struct"href="struct.KeyMut.html"title="struct toml_edit::KeyMut">KeyMut</a><'k></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq-3"class="method trait-impl"><aclass="src rightside"href="../src/toml_edit/key.rs.html#334">source</a><ahref="#method.eq-3"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &<aclass="struct"href="struct.KeyMut.html"title="struct toml_edit::KeyMut">KeyMut</a><'k>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne-3"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/cmp.rs.html#263">source</a></span><ahref="#method.ne-3"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialOrd-for-KeyMut%3C'k%3E"class="impl"><aclass="src rightside"href="../src/toml_edit/key.rs.html#334">source</a><ahref="#impl-PartialOrd-for-KeyMut%3C'k%3E"class="anchor">§</a><h3class="code-header">impl<'k><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html"title="trait core::cmp::PartialOrd">PartialOrd</a> for <aclass="struct"href="struct.KeyMut.html"title="struct toml_edit::KeyMut">KeyMut</a><'k></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.partial_cmp"class="method trait-impl"><aclass="src rightside"href="../src/toml_edit/key.rs.html#334">source</a><ahref="#method.partial_cmp"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp"class="fn">partial_cmp</a>(&self, other: &<aclass="struct"href="struct.KeyMut.html"title="struct toml_edit::KeyMut">KeyMut</a><'k>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><divclass='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.lt"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/cmp.rs.html#1180">source</a></span><ahref="#method.lt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html#method.lt"class="fn">lt</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.le"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/cmp.rs.html#1198">source</a></span><ahref="#method.le"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html#method.le"class="fn">le</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code>
operator. <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.gt"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/cmp.rs.html#1215">source</a></span><ahref="#method.gt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html#method.gt"class="fn">gt</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ge"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.80.0/src/core/cmp.rs.html#1233">source</a></span><ahref="#method.ge"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html#method.ge"class="fn">ge</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code>
operator. <ahref="https://doc.rust-lang.org/1.80.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><sectionid="impl-Eq-for-KeyMut%3C'k%3E"class="impl"><aclass="src rightside"href="../src/toml_edit/key.rs.html#334">source</a><ahref="#impl-Eq-for-KeyMut%3C'k%3E"class="anchor">§</a><h3class="code-header">impl<'k><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/cmp/trait.Eq.html"title="trait core::cmp::Eq">Eq</a> for <aclass="struct"href="struct.KeyMut.html"title="struct toml_edit::KeyMut">KeyMut</a><'k></h3></section><sectionid="impl-StructuralPartialEq-for-KeyMut%3C'k%3E"class="impl"><aclass="src rightside"href="../src/toml_edit/key.rs.html#334">source</a><ahref="#impl-StructuralPartialEq-for-KeyMut%3C'k%3E"class="anchor">§</a><h3class="code-header">impl<'k><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.StructuralPartialEq.html"title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <aclass="struct"href="struct.KeyMut.html"title="struct toml_edit::KeyMut">KeyMut</a><'k></h3></section></div><h2id="synthetic-implementations"class="section-header">Auto Trait Implementations<ahref="#synthetic-implementations"class="anchor">§</a></h2><divid="synthetic-implementations-list"><sectionid="impl-Freeze-for-KeyMut%3C'k%3E"class="impl"><ahref="#impl-Freeze-for-KeyMut%3C'k%3E"class="anchor">§</a><h3class="code-header">impl<'k><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Freeze.html"title="trait core::marker::Freeze">Freeze</a> for <aclass="struct"href="struct.KeyMut.html"title="struct toml_edit::KeyMut">KeyMut</a><'k></h3></section><sectionid="impl-RefUnwindSafe-for-KeyMut%3C'k%3E"class="impl"><ahref="#impl-RefUnwindSafe-for-KeyMut%3C'k%3E"class="anchor">§</a><h3class="code-header">impl<'k><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/panic/unwind_safe/trait.RefUnwindSafe.html"title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <aclass="struct"href="struct.KeyMut.html"title="struct toml_edit::KeyMut">KeyMut</a><'k></h3></section><sectionid="impl-Send-for-KeyMut%3C'k%3E"class="impl"><ahref="#impl-Send-for-KeyMut%3C'k%3E"class="anchor">§</a><h3class="code-header">impl<'k><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Send.html"title="trait core::marker::Send">Send</a> for <aclass="struct"href="struct.KeyMut.html"title="struct toml_edit::KeyMut">KeyMut</a><'k></h3></section><sectionid="impl-Sync-for-KeyMut%3C'k%3E"class="impl"><ahref="#impl-Sync-for-KeyMut%3C'k%3E"class="anchor">§</a><h3class="code-header">impl<'k><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sync.html"title="trait core::marker::Sync">Sync</a> for <aclass="struct"href="struct.KeyMut.html"title="struct toml_edit::KeyMut">KeyMut</a><'k></h3></section><sectionid="impl-Unpin-for-KeyMut%3C'k%3E"class="impl"><ahref="#impl-Unpin-for-KeyMut%3C'k%3E"class="anchor">§</a><h3class="code-header">impl<'k><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Unpin.html"title="trait core::marker::Unpin">Unpin</a> for <aclass="struct"href="struct.KeyMut.html"title="struct toml_edit::KeyMut">KeyMut</a><'k></h3></section><sectionid="impl-UnwindSafe-for-KeyMut%3C'k%3E"class="impl"><ahref="#impl-UnwindSafe-for-KeyMut%3C'k%3E"class="anchor">§</a><h3class="code-header">impl<'k> !<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/panic/unwind_safe/trait.UnwindSafe.html"title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <aclass="struct"href="struct.KeyMut.html"title="struct toml_edit::KeyMut">KeyMut</a><'k></h3></section></div><h2id="blanket-implementations"class="section-header">Blanket Implementations<ahref="#blanket-implementations"class="anchor">§</a></h2><divid="blanket-implementations-list"><detailsclass="toggleimplementors-tog
T: 'static + ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.type_id"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/any.rs.html#141">source</a><ahref="#method.type_id"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/any/trait.Any.html#tymethod.type_id"class="fn">type_id</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/core/any/struct.TypeId.html"title="struct core::any::TypeId">TypeId</a></h4></section></summary><divclass='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <ahref="https://doc.rust-lang.org/1.80.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Borrow%3CT%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/borrow.rs.html#208">source</a><ahref="#impl-Borrow%3CT%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><T> for T<divclass="where">where
T: ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.borrow"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/borrow.rs.html#210">source</a><ahref="#method.borrow"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/borrow/trait.Borrow.html#tymethod.borrow"class="fn">borrow</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&T</a></h4></section></summary><divclass='docblock'>Immutably borrows from an owned value. <ahref="https://doc.rust-lang.org/1.80.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-BorrowMut%3CT%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/borrow.rs.html#216">source</a><ahref="#impl-BorrowMut%3CT%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.BorrowMut.html"title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<divclass="where">where
T: ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.borrow_mut"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/borrow.rs.html#217">source</a><ahref="#method.borrow_mut"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut"class="fn">borrow_mut</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&mut T</a></h4></section></summary><divclass='docblock'>Mutably borrows from an owned value. <ahref="https://doc.rust-lang.org/1.80.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Comparable%3CK%3E-for-Q"class="impl"><aclass="src rightside"href="../src/equivalent/lib.rs.html#104-107">source</a><ahref="#impl-Comparable%3CK%3E-for-Q"class="anchor">§</a><h3class="code-header">impl<Q, K><aclass="trait"href="../equivalent/trait.Comparable.html"title="trait equivalent::Comparable">Comparable</a><K> for Q<divclass="where">where
K: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><Q> + ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.equivalent"class="method trait-impl"><aclass="src rightside"href="../src/hashbrown/lib.rs.html#171">source</a><ahref="#method.equivalent"class="anchor">§</a><h4class="code-header">fn <ahref="../hashbrown/trait.Equivalent.html#tymethod.equivalent"class="fn">equivalent</a>(&self, key: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&K</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>Checks if this value is equivalent to the given key. <ahref="../hashbrown/trait.Equivalent.html#tymethod.equivalent">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Equivalent%3CK%3E-for-Q-1"class="impl"><aclass="src rightside"href="../src/equivalent/lib.rs.html#82-85">source</a><ahref="#impl-Equivalent%3CK%3E-for-Q-1"class="anchor">§</a><h3class="code-header">impl<Q, K><aclass="trait"href="../equivalent/trait.Equivalent.html"title="trait equivalent::Equivalent">Equivalent</a><K> for Q<divclass="where">where
<code><ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-ToString-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/alloc/string.rs.html#2552">source</a><ahref="#impl-ToString-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.80.0/alloc/string/trait.ToString.html"title="trait alloc::string::ToString">ToString</a> for T<divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/fmt/trait.Display.html"title="trait core::fmt::Display">Display</a> + ?<aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_string"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/alloc/string.rs.html#2558">source</a><ahref="#method.to_string"class="anchor">§</a><h4class="code-header">default fn <ahref="https://doc.rust-lang.org/1.80.0/alloc/string/trait.ToString.html#tymethod.to_string"class="fn">to_string</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.80.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></section></summary><divclass='docblock'>Converts the given value to a <code>String</code>. <ahref="https://doc.rust-lang.org/1.80.0/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryFrom%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#805-807">source</a><ahref="#impl-TryFrom%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_from"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#812">source</a><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#tymethod.try_from"class="fn">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryInto%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#790-792">source</a><ahref="#impl-TryInto%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_into"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#797">source</a><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryInto.html#tymethod.try_into"class="fn">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details></div><scripttype="text/json"id="notable-traits-data">{"&[u8]":"<h3>Notable traits for <code>&[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.80.0/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.80.0/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.80.0/std/primitive.u8.html\">u8</a>]</div>"}</script></section></div></main></body></html>