<!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="API documentation for the Rust `ROOT_PLAYER_DIR` struct in crate `abstio`."><metaname="keywords"content="rust, rustlang, rust-lang, ROOT_PLAYER_DIR"><title>ROOT_PLAYER_DIR in abstio::abst_paths - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../SourceSerif4-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../FiraSans-Regular.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../FiraSans-Medium.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../SourceCodePro-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../SourceSerif4-Bold.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../SourceCodePro-Semibold.ttf.woff2"><linkrel="stylesheet"type="text/css"href="../../normalize.css"><linkrel="stylesheet"type="text/css"href="../../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"type="text/css"href="../../ayu.css"disabled><linkrel="stylesheet"type="text/css"href="../../dark.css"disabled><linkrel="stylesheet"type="text/css"href="../../light.css"id="themeStyle"><scriptid="default-settings"></script><scriptsrc="../../storage.js"></script><scriptsrc="../../crates.js"></script><scriptdefersrc="../../main.js"></script>
<noscript><linkrel="stylesheet"href="../../noscript.css"></noscript><linkrel="alternate icon"type="image/png"href="../../favicon-16x16.png"><linkrel="alternate icon"type="image/png"href="../../favicon-32x32.png"><linkrel="icon"type="image/svg+xml"href="../../favicon.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="sidebar"><divclass="sidebar-menu"role="button">☰</div><aclass="sidebar-logo"href="../../abstio/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../../rust-logo.png"alt="logo"></div>
</a><h2class="location">Struct ROOT_PLAYER_DIR</h2><divclass="sidebar-elems"><divclass="block items"><h3class="sidebar-title"><ahref="#fields">Fields</a></h3><divclass="sidebar-links"><ahref="#structfield.__private_field">__private_field</a></div><h3class="sidebar-title"><ahref="#deref-methods-String">Methods from Deref<Target=String></a></h3><divclass="sidebar-links"><ahref="#method.as_bytes">as_bytes</a><ahref="#method.as_str">as_str</a><ahref="#method.capacity">capacity</a><ahref="#method.is_empty">is_empty</a><ahref="#method.len">len</a></div><h3class="sidebar-title"><ahref="#deref-methods-str">Methods from Deref<Target=str></a></h3><divclass="sidebar-links"><ahref="#method.as_bytes">as_bytes</a><ahref="#method.as_ptr">as_ptr</a><ahref="#method.bytes">bytes</a><ahref="#method.char_indices">char_indices</a><ahref="#method.chars">chars</a><ahref="#method.contains">contains</a><ahref="#method.encode_utf16">encode_utf16</a><ahref="#method.ends_with">ends_with</a><ahref="#method.eq_ignore_ascii_case">eq_ignore_ascii_case</a><ahref="#method.escape_debug">escape_debug</a><ahref="#method.escape_default">escape_default</a><ahref="#method.escape_unicode">escape_unicode</a><ahref="#method.find">find</a><ahref="#method.get">get</a><ahref="#method.get_unchecked">get_unchecked</a><ahref="#method.is_ascii">is_ascii</a><ahref="#method.is_char_boundary">is_char_boundary</a><ahref="#method.is_empty">is_empty</a><ahref="#method.len">len</a><ahref="#method.lines">lines</a><ahref="#method.lines_any">lines_any</a><ahref="#method.match_indices">match_indices</a><ahref="#method.matches">matches</a><ahref="#method.parse">parse</a><ahref="#method.repeat">repeat</a><ahref="#method.replace">replace</a><ahref="#method.replacen">replacen</a><ahref="#method.rfind">rfind</a><ahref="#method.rmatch_indices">rmatch_indices</a><ahref="#method.rmatches">rmatches</a><ahref="#method.rsplit">rsplit</a><ahref="#method.rsplit_once">rsplit_once</a><ahref="#method.rsplit_terminator">rsplit_terminator</a><ahref="#method.rsplitn">rsplitn</a><ahref="#method.slice_unchecked">slice_unchecked</a><ahref="#method.split">split</a><ahref="#method.split_ascii_whitespace">split_ascii_whitespace</a><ahref="#method.split_at">split_at</a><ahref="#method.split_inclusive">split_inclusive</a><ahref="#method.split_once">split_once</a><ahref="#method.split_terminator">split_terminator</a><ahref="#method.split_whitespace">split_whitespace</a><ahref="#method.splitn">splitn</a><ahref="#method.starts_with">starts_with</a><ahref="#method.strip_prefix">strip_prefix</a><ahref="#method.strip_suffix">strip_suffix</a><ahref="#method.to_ascii_lowercase">to_ascii_lowercase</a><ahref="#method.to_ascii_uppercase">to_ascii_uppercase</a><ahref="#method.to_lowercase">to_lowercase</a><ahref="#method.to_uppercase">to_uppercase</a><ahref="#method.trim">trim</a><ahref="#method.trim_end">trim_end</a><ahref="#method.trim_end_matches">trim_end_matches</a><ahref="#method.trim_left">trim_left</a><ahref="#method.trim_left_matches">trim_left_matches</a><ahref="#method.trim_matches">trim_matches</a><ahref="#method.trim_right">trim_right</a><ahref="#method.trim_right_matches">trim_right_matches</a><ahref="#method.trim_start">trim_start</a><ahref="#method.trim_start_matches">trim_start_matches</a></div><h3class="sidebar-title"><ahref="#trait-implementations">Trait Implementations</a></h3><divclass="sidebar-links"><ahref="#impl-Deref">Deref</a><ahref="#impl-LazyStatic">LazyStatic</a></div><h3class="sidebar-title"><ahref="#synthetic-implementations">Auto Trait Implementations</a></h3><divclass="sidebar-links"><ahref="#impl-RefUnwindSafe">RefUnwindSafe</a><ahref="#impl-Send">Send</a><ahref="#impl-Sync">Sync</a><ahref="#impl-Unpin">Unpin</a><ahref="#impl-UnwindSafe">UnwindSafe</a></div><h3class="sidebar-title"><ahref="#blanket-implementations">Blanket Implementations</a></h3><divclass="sidebar-links"><ahref="#impl-Any">Any</a><ahref="#impl-Borrow%3CT%3E">Borrow<T></a><ahref="#impl-BorrowMut%3
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.capacity"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/alloc/string.rs.html#903"title="goto source code">[src]</a></div><ahref="#method.capacity"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.capacity"class="fnname">capacity</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.usize.html">usize</a></h4></div></summary><divclass="docblock"><p>Returns this <code>String</code>’s capacity, in bytes.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.as_bytes"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/alloc/string.rs.html#1171"title="goto source code">[src]</a></div><ahref="#method.as_bytes"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.as_bytes"class="fnname">as_bytes</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">&[</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.u8.html">u8</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">]</a><spanclass="notable-traits"><spanclass="notable-traits-tooltip">ⓘ<divclass="notable-traits-tooltiptext"><spanclass="docblock"><divclass="notable">Notable traits for <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">&'_ [</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.u8.html">u8</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">]</a></div><codeclass="content"><spanclass="where fmt-newline">impl<'_><aclass="trait"href="https://doc.rust-lang.org/1.59.0/std/io/trait.Read.html"title="trait std::io::Read">Read</a> for <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">&'_ [</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.u8.html">u8</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">]</a></span><spanclass="where fmt-newline">impl<'_><aclass="trait"href="https://doc.rust-lang.org/1.59.0/std/io/trait.Write.html"title="trait std::io::Write">Write</a> for <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">&'_ mut [</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.u8.html">u8</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">]</a></span></code></span></div></span></span></h4></div></summary><divclass="docblock"><p>Returns a byte slice of this <code>String</code>’s contents.</p>
<p>The inverse of this method is <ahref="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html#method.from_utf8"><code>from_utf8</code></a>.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.len"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/alloc/string.rs.html#1550"title="goto source code">[src]</a></div><ahref="#method.len"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.len"class="fnname">len</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.usize.html">usize</a></h4></div></summary><divclass="docblock"><p>Returns the length of this <code>String</code>, in bytes, not <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"title="char"><code>char</code></a>s or
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.is_empty"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/alloc/string.rs.html#1570"title="goto source code">[src]</a></div><ahref="#method.is_empty"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.is_empty"class="fnname">is_empty</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><divclass="docblock"><p>Returns <code>true</code> if this <code>String</code> has a length of zero, and <code>false</code> otherwise.</p>
</div></details></div><h2id="deref-methods-str"class="small-section-header"><span>Methods from <aclass="trait"href="https://doc.rust-lang.org/1.59.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.59.0/std/primitive.str.html">str</a>></span><ahref="#deref-methods-str"class="anchor"></a></h2><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.len-1"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#145"title="goto source code">[src]</a></div><ahref="#method.len-1"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.len-1"class="fnname">len</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.usize.html">usize</a></h4></div></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.59.0/std/primitive.char.html"><code>char</code></a>s or graphemes. In other words,
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.is_empty-1"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#166"title="goto source code">[src]</a></div><ahref="#method.is_empty-1"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.is_empty-1"class="fnname">is_empty</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><divclass="docblock"><p>Returns <code>true</code> if <code>self</code> has a length of zero bytes.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.is_char_boundary"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.9.0">1.9.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#196"title="goto source code">[src]</a></div><ahref="#method.is_char_boundary"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.is_char_boundary"class="fnname">is_char_boundary</a>(&self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.usize.html">usize</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><divclass="docblock"><p>Checks that <code>index</code>-th byte is the first byte in a UTF-8 code point
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.as_bytes-1"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#238"title="goto source code">[src]</a></div><ahref="#method.as_bytes-1"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.as_bytes-1"class="fnname">as_bytes</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">&[</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.u8.html">u8</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">]</a><spanclass="notable-traits"><spanclass="notable-traits-tooltip">ⓘ<divclass="notable-traits-tooltiptext"><spanclass="docblock"><divclass="notable">Notable traits for <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">&'_ [</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.u8.html">u8</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">]</a></div><codeclass="content"><spanclass="where fmt-newline">impl<'_><aclass="trait"href="https://doc.rust-lang.org/1.59.0/std/io/trait.Read.html"title="trait std::io::Read">Read</a> for <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">&'_ [</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.u8.html">u8</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">]</a></span><spanclass="where fmt-newline">impl<'_><aclass="trait"href="https://doc.rust-lang.org/1.59.0/std/io/trait.Write.html"title="trait std::io::Write">Write</a> for <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">&'_ mut [</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.u8.html">u8</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.slice.html">]</a></span></code></span></div></span></span></h4></div></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.59.0/core/str/converts/fn.from_utf8.html"title="from_utf8"><code>from_utf8</code></a> function.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.as_ptr"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#313"title="goto source code">[src]</a></div><ahref="#method.as_ptr"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.as_ptr"class="fnname">as_ptr</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.pointer.html">*const </a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.u8.html">u8</a></h4></div></summary><divclass="docblock"><p>Converts a string slice to a raw pointer.</p>
<ahref="https://doc.rust-lang.org/1.59.0/std/primitive.u8.html"title="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.59.0/std/primitive.str.html#method.as_mut_ptr"><code>as_mut_ptr</code></a>.</p>
alternative see <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.str.html"title="str"><code>str</code></a> and <ahref="https://doc.rust-lang.org/1.59.0/core/ops/index/trait.Index.html"><code>Index</code></a>.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.split_at"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.4.0">1.4.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#578"title="goto source code">[src]</a></div><ahref="#method.split_at"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.split_at"class="fnname">split_at</a>(&self, mid: <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.usize.html">usize</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.tuple.html">(</a>&<aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.tuple.html">)</a></h4></div></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.59.0/std/primitive.str.html#method.split_at_mut"><code>split_at_mut</code></a>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.chars"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#688"title="goto source code">[src]</a></div><ahref="#method.chars"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.chars"class="fnname">chars</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.Chars.html"title="struct core::str::iter::Chars">Chars</a><'_></h4></div></summary><divclass="docblock"><p>Returns an iterator over the <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s of a string slice.</p>
<p>Remember, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><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>), <spanclass="ident">chars</span>.<spanclass="ident">next</span>()); <spanclass="comment">// not 'y̆'</span>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.char_indices"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#745"title="goto source code">[src]</a></div><ahref="#method.char_indices"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.char_indices"class="fnname">char_indices</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.CharIndices.html"title="struct core::str::iter::CharIndices">CharIndices</a><'_></h4></div></summary><divclass="docblock"><p>Returns an iterator over the <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s of a string slice, and their
<p>Remember, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s might not match your intuition about characters:</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.bytes"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#770"title="goto source code">[src]</a></div><ahref="#method.bytes"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.bytes"class="fnname">bytes</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.Bytes.html"title="struct core::str::iter::Bytes">Bytes</a><'_></h4></div></summary><divclass="docblock"><p>An iterator over the bytes of a string slice.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.split_whitespace"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.1.0">1.1.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#815"title="goto source code">[src]</a></div><ahref="#method.split_whitespace"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.split_whitespace"class="fnname">split_whitespace</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.SplitWhitespace.html"title="struct core::str::iter::SplitWhitespace">SplitWhitespace</a><'_></h4></div></summary><divclass="docblock"><p>Splits a string slice by whitespace.</p>
instead, use <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.str.html#method.split_ascii_whitespace"><code>split_ascii_whitespace</code></a>.</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let</span><spanclass="kw-2">mut</span><spanclass="ident">iter</span><spanclass="op">=</span><spanclass="string">"A few words"</span>.<spanclass="ident">split_whitespace</span>();
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.split_ascii_whitespace"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.34.0">1.34.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#858"title="goto source code">[src]</a></div><ahref="#method.split_ascii_whitespace"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.split_ascii_whitespace"class="fnname">split_ascii_whitespace</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.SplitAsciiWhitespace.html"title="struct core::str::iter::SplitAsciiWhitespace">SplitAsciiWhitespace</a><'_></h4></div></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.59.0/std/primitive.str.html#method.split_whitespace"><code>split_whitespace</code></a>.</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let</span><spanclass="kw-2">mut</span><spanclass="ident">iter</span><spanclass="op">=</span><spanclass="string">"A few words"</span>.<spanclass="ident">split_ascii_whitespace</span>();
<p>All kinds of ASCII whitespace are considered:</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let</span><spanclass="kw-2">mut</span><spanclass="ident">iter</span><spanclass="op">=</span><spanclass="string">" Mary had\ta little \n\t lamb"</span>.<spanclass="ident">split_ascii_whitespace</span>();
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.lines"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#904"title="goto source code">[src]</a></div><ahref="#method.lines"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.lines"class="fnname">lines</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.Lines.html"title="struct core::str::iter::Lines">Lines</a><'_></h4></div></summary><divclass="docblock"><p>An iterator over the lines of a string, as string slices.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.encode_utf16"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.8.0">1.8.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#934"title="goto source code">[src]</a></div><ahref="#method.encode_utf16"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.encode_utf16"class="fnname">encode_utf16</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.EncodeUtf16.html"title="struct core::str::iter::EncodeUtf16">EncodeUtf16</a><'_></h4></div></summary><divclass="docblock"><p>Returns an iterator of <code>u16</code> over the string encoded as UTF-16.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.contains"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#961"title="goto source code">[src]</a></div><ahref="#method.contains"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.contains"class="fnname">contains</a><'a, P>(&'a self, pat: P) -><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>, </span></h4></div></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.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.starts_with"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#987"title="goto source code">[src]</a></div><ahref="#method.starts_with"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.starts_with"class="fnname">starts_with</a><'a, P>(&'a self, pat: P) -><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>, </span></h4></div></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.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.ends_with"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1013-1015"title="goto source code">[src]</a></div><ahref="#method.ends_with"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.ends_with"class="fnname">ends_with</a><'a, P>(&'a self, pat: P) -><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,<br> <P as <aclass="trait"href="https://doc.rust-lang.org/1.59.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.59.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.59.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>, </span></h4></div></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.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.find"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1064"title="goto source code">[src]</a></div><ahref="#method.find"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.find"class="fnname">find</a><'a, P>(&'a self, pat: P) -><aclass="enum"href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.usize.html">usize</a>><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>, </span></h4></div></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.59.0/core/option/enum.Option.html#variant.None"title="None"><code>None</code></a> if the pattern doesn’t match.</p>
<p>The <ahref="https://doc.rust-lang.org/1.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.rfind"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1110-1112"title="goto source code">[src]</a></div><ahref="#method.rfind"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.rfind"class="fnname">rfind</a><'a, P>(&'a self, pat: P) -><aclass="enum"href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.usize.html">usize</a>><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,<br> <P as <aclass="trait"href="https://doc.rust-lang.org/1.59.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.59.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.59.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>, </span></h4></div></summary><divclass="docblock"><p>Returns the byte index for the first character of the rightmost match of the pattern in
<p>Returns <ahref="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html#variant.None"title="None"><code>None</code></a> if the pattern doesn’t match.</p>
<p>The <ahref="https://doc.rust-lang.org/1.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.split"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1232"title="goto source code">[src]</a></div><ahref="#method.split"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.split"class="fnname">split</a><'a, P>(&'a self, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.Split.html"title="struct core::str::iter::Split">Split</a><'a, P><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>, </span></h4></div></summary><divclass="docblock"><p>An iterator over substrings of this string slice, separated by
<p>The <ahref="https://doc.rust-lang.org/1.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
<p>The returned iterator will be a <ahref="https://doc.rust-lang.org/1.59.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if the pattern
elements. This is true for, e.g., <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, but not for <code>&str</code>.</p>
from a forward search, the <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.str.html#method.rsplit"><code>rsplit</code></a> method can be used.</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let</span><spanclass="ident">v</span>: <spanclass="ident">Vec</span><spanclass="op"><</span><spanclass="kw-2">&</span><spanclass="ident">str</span><spanclass="op">></span><spanclass="op">=</span><spanclass="string">"Mary had a little lamb"</span>.<spanclass="ident">split</span>(<spanclass="string">''</span>).<spanclass="ident">collect</span>();
<p>Contiguous separators can lead to possibly surprising behavior
when whitespace is used as the separator. This code is correct:</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let</span><spanclass="ident">x</span><spanclass="op">=</span><spanclass="string">" a b c"</span>.<spanclass="ident">to_string</span>();
<p>Use <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.str.html#method.split_whitespace"><code>split_whitespace</code></a> for this behavior.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.split_inclusive"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.51.0">1.51.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1272"title="goto source code">[src]</a></div><ahref="#method.split_inclusive"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.split_inclusive"class="fnname">split_inclusive</a><'a, P>(&'a self, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.SplitInclusive.html"title="struct core::str::iter::SplitInclusive">SplitInclusive</a><'a, P><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>, </span></h4></div></summary><divclass="docblock"><p>An iterator over substrings of this string slice, separated by
<p>The <ahref="https://doc.rust-lang.org/1.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let</span><spanclass="ident">v</span>: <spanclass="ident">Vec</span><spanclass="op"><</span><spanclass="kw-2">&</span><spanclass="ident">str</span><spanclass="op">></span><spanclass="op">=</span><spanclass="string">"Mary had a little lamb\nlittle lamb\nlittle lamb."</span>
<spanclass="macro">assert_eq!</span>(<spanclass="ident">v</span>, [<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><spanclass="ident">v</span>: <spanclass="ident">Vec</span><spanclass="op"><</span><spanclass="kw-2">&</span><spanclass="ident">str</span><spanclass="op">></span><spanclass="op">=</span><spanclass="string">"Mary had a little lamb\nlittle lamb\nlittle lamb.\n"</span>
<spanclass="macro">assert_eq!</span>(<spanclass="ident">v</span>, [<spanclass="string">"Mary had a little lamb\n"</span>, <spanclass="string">"little lamb\n"</span>, <spanclass="string">"little lamb.\n"</span>]);</code></pre></div>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.rsplit"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1327-1329"title="goto source code">[src]</a></div><ahref="#method.rsplit"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.rsplit"class="fnname">rsplit</a><'a, P>(&'a self, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.RSplit.html"title="struct core::str::iter::RSplit">RSplit</a><'a, P><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,<br> <P as <aclass="trait"href="https://doc.rust-lang.org/1.59.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.59.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.59.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>, </span></h4></div></summary><divclass="docblock"><p>An iterator over substrings of the given string slice, separated by
<p>The <ahref="https://doc.rust-lang.org/1.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
search, and it will be a <ahref="https://doc.rust-lang.org/1.59.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if a forward/reverse
<p>For iterating from the front, the <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.str.html#method.split"><code>split</code></a> method can be used.</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let</span><spanclass="ident">v</span>: <spanclass="ident">Vec</span><spanclass="op"><</span><spanclass="kw-2">&</span><spanclass="ident">str</span><spanclass="op">></span><spanclass="op">=</span><spanclass="string">"Mary had a little lamb"</span>.<spanclass="ident">rsplit</span>(<spanclass="string">''</span>).<spanclass="ident">collect</span>();
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.split_terminator"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1378"title="goto source code">[src]</a></div><ahref="#method.split_terminator"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.split_terminator"class="fnname">split_terminator</a><'a, P>(&'a self, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.SplitTerminator.html"title="struct core::str::iter::SplitTerminator">SplitTerminator</a><'a, P><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>, </span></h4></div></summary><divclass="docblock"><p>An iterator over substrings of the given string slice, separated by
<p>The <ahref="https://doc.rust-lang.org/1.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
<p>Equivalent to <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.str.html#method.split"><code>split</code></a>, except that the trailing substring
<p>The returned iterator will be a <ahref="https://doc.rust-lang.org/1.59.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if the pattern
elements. This is true for, e.g., <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, but not for <code>&str</code>.</p>
from a forward search, the <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.str.html#method.rsplit_terminator"><code>rsplit_terminator</code></a> method can be used.</p>
<p>The <ahref="https://doc.rust-lang.org/1.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
<p>Equivalent to <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.str.html#method.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.59.0/std/primitive.str.html#method.split_terminator"><code>split_terminator</code></a> method can be
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.splitn"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1479"title="goto source code">[src]</a></div><ahref="#method.splitn"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.splitn"class="fnname">splitn</a><'a, P>(&'a self, n: <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.usize.html">usize</a>, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.SplitN.html"title="struct core::str::iter::SplitN">SplitN</a><'a, P><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>, </span></h4></div></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.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
<p>If the pattern allows a reverse search, the <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.str.html#method.rsplitn"><code>rsplitn</code></a> method can be
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let</span><spanclass="ident">v</span>: <spanclass="ident">Vec</span><spanclass="op"><</span><spanclass="kw-2">&</span><spanclass="ident">str</span><spanclass="op">></span><spanclass="op">=</span><spanclass="string">"Mary had a little lambda"</span>.<spanclass="ident">splitn</span>(<spanclass="number">3</span>, <spanclass="string">''</span>).<spanclass="ident">collect</span>();
<spanclass="macro">assert_eq!</span>(<spanclass="ident">v</span>, [<spanclass="string">"Mary"</span>, <spanclass="string">"had"</span>, <spanclass="string">"a little lambda"</span>]);
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.rsplitn"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1528-1530"title="goto source code">[src]</a></div><ahref="#method.rsplitn"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.rsplitn"class="fnname">rsplitn</a><'a, P>(&'a self, n: <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.usize.html">usize</a>, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.RSplitN.html"title="struct core::str::iter::RSplitN">RSplitN</a><'a, P><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,<br> <P as <aclass="trait"href="https://doc.rust-lang.org/1.59.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.59.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.59.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>, </span></h4></div></summary><divclass="docblock"><p>An iterator over substrings of this string slice, separated by a
<p>The <ahref="https://doc.rust-lang.org/1.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
<p>For splitting from the front, the <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.str.html#method.splitn"><code>splitn</code></a> method can be used.</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let</span><spanclass="ident">v</span>: <spanclass="ident">Vec</span><spanclass="op"><</span><spanclass="kw-2">&</span><spanclass="ident">str</span><spanclass="op">></span><spanclass="op">=</span><spanclass="string">"Mary had a little lamb"</span>.<spanclass="ident">rsplitn</span>(<spanclass="number">3</span>, <spanclass="string">''</span>).<spanclass="ident">collect</span>();
<spanclass="macro">assert_eq!</span>(<spanclass="ident">v</span>, [<spanclass="string">"lamb"</span>, <spanclass="string">"little"</span>, <spanclass="string">"Mary had a"</span>]);
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.split_once"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.52.0">1.52.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1547"title="goto source code">[src]</a></div><ahref="#method.split_once"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.split_once"class="fnname">split_once</a><'a, P>(&'a self, delimiter: P) -><aclass="enum"href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.tuple.html">(</a>&'a <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>, &'a <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.tuple.html">)</a>><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>, </span></h4></div></summary><divclass="docblock"><p>Splits the string on the first occurrence of the specified delimiter and
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.rsplit_once"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.52.0">1.52.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1565-1567"title="goto source code">[src]</a></div><ahref="#method.rsplit_once"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.rsplit_once"class="fnname">rsplit_once</a><'a, P>(&'a self, delimiter: P) -><aclass="enum"href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.tuple.html">(</a>&'a <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>, &'a <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.tuple.html">)</a>><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,<br> <P as <aclass="trait"href="https://doc.rust-lang.org/1.59.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.59.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.59.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>, </span></h4></div></summary><divclass="docblock"><p>Splits the string on the last occurrence of the specified delimiter and
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.matches"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.2.0">1.2.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1607"title="goto source code">[src]</a></div><ahref="#method.matches"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.matches"class="fnname">matches</a><'a, P>(&'a self, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.Matches.html"title="struct core::str::iter::Matches">Matches</a><'a, P><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>, </span></h4></div></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.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
<p>The returned iterator will be a <ahref="https://doc.rust-lang.org/1.59.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if the pattern
elements. This is true for, e.g., <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, but not for <code>&str</code>.</p>
from a forward search, the <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.str.html#method.matches"><code>rmatches</code></a> method can be used.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.rmatches"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.2.0">1.2.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1643-1645"title="goto source code">[src]</a></div><ahref="#method.rmatches"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.rmatches"class="fnname">rmatches</a><'a, P>(&'a self, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.RMatches.html"title="struct core::str::iter::RMatches">RMatches</a><'a, P><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,<br> <P as <aclass="trait"href="https://doc.rust-lang.org/1.59.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.59.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.59.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>, </span></h4></div></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.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
search, and it will be a <ahref="https://doc.rust-lang.org/1.59.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if a forward/reverse
<p>For iterating from the front, the <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.str.html#method.matches"><code>matches</code></a> method can be used.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.match_indices"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.5.0">1.5.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1689"title="goto source code">[src]</a></div><ahref="#method.match_indices"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.match_indices"class="fnname">match_indices</a><'a, P>(&'a self, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.MatchIndices.html"title="struct core::str::iter::MatchIndices">MatchIndices</a><'a, P><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>, </span></h4></div></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.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
<p>The returned iterator will be a <ahref="https://doc.rust-lang.org/1.59.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if the pattern
elements. This is true for, e.g., <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, but not for <code>&str</code>.</p>
from a forward search, the <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.str.html#method.rmatch_indices"><code>rmatch_indices</code></a> method can be used.</p>
<spanclass="macro">assert_eq!</span>(<spanclass="ident">v</span>, [(<spanclass="number">0</span>, <spanclass="string">"aba"</span>)]); <spanclass="comment">// only the first `aba`</span></code></pre></div>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.rmatch_indices"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.5.0">1.5.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1731-1733"title="goto source code">[src]</a></div><ahref="#method.rmatch_indices"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.rmatch_indices"class="fnname">rmatch_indices</a><'a, P>(&'a self, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.RMatchIndices.html"title="struct core::str::iter::RMatchIndices">RMatchIndices</a><'a, P><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,<br> <P as <aclass="trait"href="https://doc.rust-lang.org/1.59.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.59.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.59.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>, </span></h4></div></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.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
search, and it will be a <ahref="https://doc.rust-lang.org/1.59.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if a forward/reverse
<p>For iterating from the front, the <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.str.html#method.match_indices"><code>match_indices</code></a> method can be used.</p>
<spanclass="macro">assert_eq!</span>(<spanclass="ident">v</span>, [(<spanclass="number">2</span>, <spanclass="string">"aba"</span>)]); <spanclass="comment">// only the last `aba`</span></code></pre></div>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.trim"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1756"title="goto source code">[src]</a></div><ahref="#method.trim"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.trim"class="fnname">trim</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a></h4></div></summary><divclass="docblock"><p>Returns a string slice with leading and trailing whitespace removed.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.trim_start"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.30.0">1.30.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1794"title="goto source code">[src]</a></div><ahref="#method.trim_start"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.trim_start"class="fnname">trim_start</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a></h4></div></summary><divclass="docblock"><p>Returns a string slice with leading whitespace removed.</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let</span><spanclass="ident">s</span><spanclass="op">=</span><spanclass="string">" English "</span>;
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.trim_end"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.30.0">1.30.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1832"title="goto source code">[src]</a></div><ahref="#method.trim_end"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.trim_end"class="fnname">trim_end</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a></h4></div></summary><divclass="docblock"><p>Returns a string slice with trailing whitespace removed.</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let</span><spanclass="ident">s</span><spanclass="op">=</span><spanclass="string">" English "</span>;
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.trim_left"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1876"title="goto source code">[src]</a></div><ahref="#method.trim_left"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.trim_left"class="fnname">trim_left</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a></h4></div><divclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span> Deprecated since 1.33.0: <p>superseded by <code>trim_start</code></p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.trim_right"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1920"title="goto source code">[src]</a></div><ahref="#method.trim_right"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.trim_right"class="fnname">trim_right</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a></h4></div><divclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span> Deprecated since 1.33.0: <p>superseded by <code>trim_end</code></p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.trim_matches"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#1953-1955"title="goto source code">[src]</a></div><ahref="#method.trim_matches"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.trim_matches"class="fnname">trim_matches</a><'a, P>(&'a self, pat: P) ->&'a <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,<br> <P as <aclass="trait"href="https://doc.rust-lang.org/1.59.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.59.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.59.0/core/str/pattern/trait.DoubleEndedSearcher.html"title="trait core::str::pattern::DoubleEndedSearcher">DoubleEndedSearcher</a><'a>, </span></h4></div></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.59.0/core/str/pattern/index.html">pattern</a> can be a <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a function
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.trim_start_matches"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.30.0">1.30.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#2002"title="goto source code">[src]</a></div><ahref="#method.trim_start_matches"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.trim_start_matches"class="fnname">trim_start_matches</a><'a, P>(&'a self, pat: P) ->&'a <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>, </span></h4></div></summary><divclass="docblock"><p>Returns a string slice with all prefixes that match a pattern
<p>The <ahref="https://doc.rust-lang.org/1.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
<p>The <ahref="https://doc.rust-lang.org/1.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
<p>The <ahref="https://doc.rust-lang.org/1.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.trim_end_matches"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.30.0">1.30.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#2106-2108"title="goto source code">[src]</a></div><ahref="#method.trim_end_matches"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.trim_end_matches"class="fnname">trim_end_matches</a><'a, P>(&'a self, pat: P) ->&'a <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,<br> <P as <aclass="trait"href="https://doc.rust-lang.org/1.59.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.59.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.59.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>, </span></h4></div></summary><divclass="docblock"><p>Returns a string slice with all suffixes that match a pattern
<p>The <ahref="https://doc.rust-lang.org/1.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
<p>The <ahref="https://doc.rust-lang.org/1.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
<p>The <ahref="https://doc.rust-lang.org/1.59.0/core/str/pattern/index.html">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html"><code>char</code></a>s, or a
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.parse"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#2247"title="goto source code">[src]</a></div><ahref="#method.parse"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.parse"class="fnname">parse</a><F>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.59.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.59.0/core/str/traits/trait.FromStr.html"title="trait core::str::traits::FromStr">FromStr</a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.59.0/core/str/traits/trait.FromStr.html#associatedtype.Err"title="type core::str::traits::FromStr::Err">Err</a>><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/traits/trait.FromStr.html"title="trait core::str::traits::FromStr">FromStr</a>, </span></h4></div></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.59.0/core/str/traits/trait.FromStr.html"title="FromStr"><code>FromStr</code></a> trait.</p>
<p>Will return <ahref="https://doc.rust-lang.org/1.59.0/core/str/traits/trait.FromStr.html#associatedtype.Err"><code>Err</code></a> if it’s not possible to parse this string slice into
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.is_ascii"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.23.0">1.23.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#2265"title="goto source code">[src]</a></div><ahref="#method.is_ascii"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.is_ascii"class="fnname">is_ascii</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><divclass="docblock"><p>Checks if all characters in this string are within the ASCII range.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.eq_ignore_ascii_case"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.23.0">1.23.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#2287"title="goto source code">[src]</a></div><ahref="#method.eq_ignore_ascii_case"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.eq_ignore_ascii_case"class="fnname">eq_ignore_ascii_case</a>(&self, other: &<aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a></h4></div></summary><divclass="docblock"><p>Checks that two strings are an ASCII case-insensitive match.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.escape_debug"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.34.0">1.34.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#2382"title="goto source code">[src]</a></div><ahref="#method.escape_debug"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.escape_debug"class="fnname">escape_debug</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.EscapeDebug.html"title="struct core::str::iter::EscapeDebug">EscapeDebug</a><'_></h4></div></summary><divclass="docblock"><p>Return an iterator that escapes each char in <code>self</code> with <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html#method.escape_debug"title="char::escape_debug"><code>char::escape_debug</code></a>.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.escape_default"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.34.0">1.34.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#2428"title="goto source code">[src]</a></div><ahref="#method.escape_default"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.escape_default"class="fnname">escape_default</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.EscapeDefault.html"title="struct core::str::iter::EscapeDefault">EscapeDefault</a><'_></h4></div></summary><divclass="docblock"><p>Return an iterator that escapes each char in <code>self</code> with <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html#method.escape_default"title="char::escape_default"><code>char::escape_default</code></a>.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.escape_unicode"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.34.0">1.34.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/str/mod.rs.html#2466"title="goto source code">[src]</a></div><ahref="#method.escape_unicode"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.escape_unicode"class="fnname">escape_unicode</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/core/str/iter/struct.EscapeUnicode.html"title="struct core::str::iter::EscapeUnicode">EscapeUnicode</a><'_></h4></div></summary><divclass="docblock"><p>Return an iterator that escapes each char in <code>self</code> with <ahref="https://doc.rust-lang.org/1.59.0/std/primitive.char.html#method.escape_unicode"title="char::escape_unicode"><code>char::escape_unicode</code></a>.</p>
</div></details></div><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.replace"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/alloc/str.rs.html#287"title="goto source code">[src]</a></div><ahref="#method.replace"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.replace"class="fnname">replace</a><'a, P>(&'a self, from: P, to: &<aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>, </span></h4></div></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.59.0/alloc/string/struct.String.html"title="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><spanclass="ident">s</span><spanclass="op">=</span><spanclass="string">"this is old"</span>;
<spanclass="macro">assert_eq!</span>(<spanclass="string">"this is new"</span>, <spanclass="ident">s</span>.<spanclass="ident">replace</span>(<spanclass="string">"old"</span>, <spanclass="string">"new"</span>));</code></pre></div>
<p>When the pattern doesn’t match:</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let</span><spanclass="ident">s</span><spanclass="op">=</span><spanclass="string">"this is old"</span>;
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.replacen"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.16.0">1.16.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/alloc/str.rs.html#326"title="goto source code">[src]</a></div><ahref="#method.replacen"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.replacen"class="fnname">replacen</a><'a, P>(&'a self, pat: P, to: &<aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.str.html">str</a>, count: <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a><spanclass="where fmt-newline">where<br> P: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>, </span></h4></div></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.59.0/alloc/string/struct.String.html"title="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><spanclass="ident">s</span><spanclass="op">=</span><spanclass="string">"this is old"</span>;
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.to_lowercase"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.2.0">1.2.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/alloc/str.rs.html#382"title="goto source code">[src]</a></div><ahref="#method.to_lowercase"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.to_lowercase"class="fnname">to_lowercase</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></div></summary><divclass="docblock"><p>Returns the lowercase equivalent of this string slice, as a new <ahref="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html"title="String"><code>String</code></a>.</p>
the case, this function returns a <ahref="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html"title="String"><code>String</code></a> instead of modifying the
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.to_uppercase"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.2.0">1.2.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/alloc/str.rs.html#464"title="goto source code">[src]</a></div><ahref="#method.to_uppercase"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.to_uppercase"class="fnname">to_uppercase</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></div></summary><divclass="docblock"><p>Returns the uppercase equivalent of this string slice, as a new <ahref="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html"title="String"><code>String</code></a>.</p>
the case, this function returns a <ahref="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html"title="String"><code>String</code></a> instead of modifying the
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.repeat"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.16.0">1.16.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/alloc/str.rs.html#526"title="goto source code">[src]</a></div><ahref="#method.repeat"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.repeat"class="fnname">repeat</a>(&self, n: <aclass="primitive"href="https://doc.rust-lang.org/1.59.0/std/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></div></summary><divclass="docblock"><p>Creates a new <ahref="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html"title="String"><code>String</code></a> by repeating a string <code>n</code> times.</p>
<divclass='information'><divclass='tooltip should_panic'>ⓘ</div></div><divclass="example-wrap"><preclass="rust rust-example-rendered should_panic"><code><spanclass="comment">// this will panic at runtime</span>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.to_ascii_uppercase"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.23.0">1.23.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/alloc/str.rs.html#555"title="goto source code">[src]</a></div><ahref="#method.to_ascii_uppercase"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.to_ascii_uppercase"class="fnname">to_ascii_uppercase</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></div></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.59.0/std/primitive.str.html#method.make_ascii_uppercase"><code>make_ascii_uppercase</code></a>.</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let</span><spanclass="ident">s</span><spanclass="op">=</span><spanclass="string">"Grüße, Jürgen ❤"</span>;
<spanclass="macro">assert_eq!</span>(<spanclass="string">"GRüßE, JüRGEN ❤"</span>, <spanclass="ident">s</span>.<spanclass="ident">to_ascii_uppercase</span>());</code></pre></div>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.to_ascii_lowercase"class="method has-srclink"><divclass="rightside"><spanclass="since"title="Stable since Rust version 1.23.0">1.23.0</span><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/alloc/str.rs.html#587"title="goto source code">[src]</a></div><ahref="#method.to_ascii_lowercase"class="anchor"></a><h4class="code-header">pub fn <ahref="#method.to_ascii_lowercase"class="fnname">to_ascii_lowercase</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></div></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.59.0/std/primitive.str.html#method.make_ascii_lowercase"><code>make_ascii_lowercase</code></a>.</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let</span><spanclass="ident">s</span><spanclass="op">=</span><spanclass="string">"Grüße, Jürgen ❤"</span>;
<spanclass="macro">assert_eq!</span>(<spanclass="string">"grüße, jürgen ❤"</span>, <spanclass="ident">s</span>.<spanclass="ident">to_ascii_lowercase</span>());</code></pre></div>
</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"open><summary><divid="impl-Instrument"class="impl has-srclink"><divclass="rightside"><aclass="srclink"href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#155"title="goto source code">[src]</a></div><ahref="#impl-Instrument"class="anchor"></a><h3class="code-header in-band">impl<T><aclass="trait"href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html"title="trait tracing::instrument::Instrument">Instrument</a> for T</h3></div></summary><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.instrument"class="method trait-impl has-srclink"><divclass="rightside"><aclass="srclink"href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#38"title="goto source code">[src]</a></div><ahref="#method.instrument"class="anchor"></a><h4class="code-header">fn <ahref="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.instrument"class="fnname">instrument</a>(self, span: <aclass="struct"href="https://docs.rs/tracing/0.1.26/tracing/span/struct.Span.html"title="struct tracing::span::Span">Span</a>) -><aclass="struct"href="https://docs.rs/tracing/0.1.26/tracing/instrument/struct.Instrumented.html"title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></div></summary><divclass='docblock'><p>Instruments this type with the provided <code>Span</code>, returning an
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.in_current_span"class="method trait-impl has-srclink"><divclass="rightside"><aclass="srclink"href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#74"title="goto source code">[src]</a></div><ahref="#method.in_current_span"class="anchor"></a><h4class="code-header">fn <ahref="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.in_current_span"class="fnname">in_current_span</a>(self) -><aclass="struct"href="https://docs.rs/tracing/0.1.26/tracing/instrument/struct.Instrumented.html"title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></div></summary><divclass='docblock'><p>Instruments this type with the <ahref="../struct.Span.html#method.current">current</a><code>Span</code>, returning an
</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"open><summary><divid="impl-Into%3CU%3E"class="impl has-srclink"><divclass="rightside"><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#538-545"title="goto source code">[src]</a></div><ahref="#impl-Into%3CU%3E"class="anchor"></a><h3class="code-header in-band">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><T>, </span></h3></div></summary><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.into"class="method trait-impl has-srclink"><divclass="rightside"><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#542"title="goto source code">[src]</a></div><ahref="#method.into"class="anchor"></a><h4class="code-header">pub fn <ahref="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html#tymethod.into"class="fnname">into</a>(self) -> U</h4></div></summary><divclass='docblock'><p>Performs the conversion.</p>
</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"open><summary><divid="impl-TryFrom%3CU%3E"class="impl has-srclink"><divclass="rightside"><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#588-597"title="goto source code">[src]</a></div><ahref="#impl-TryFrom%3CU%3E"class="anchor"></a><h3class="code-header in-band">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>, </span></h3></div></summary><divclass="impl-items"><detailsclass="rustdoc-toggle"open><summary><divid="associatedtype.Error-1"class="type trait-impl has-srclink"><ahref="#associatedtype.Error-1"class="anchor"></a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.59.0/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></h4></div></summary><divclass='docblock'><p>The type returned in the event of a conversion error.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.try_from"class="method trait-impl has-srclink"><divclass="rightside"><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#594"title="goto source code">[src]</a></div><ahref="#method.try_from"class="anchor"></a><h4class="code-header">pub fn <ahref="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#tymethod.try_from"class="fnname">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/1.59.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.59.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></div></summary><divclass='docblock'><p>Performs the conversion.</p>
</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"open><summary><divid="impl-TryInto%3CU%3E"class="impl has-srclink"><divclass="rightside"><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#574-583"title="goto source code">[src]</a></div><ahref="#impl-TryInto%3CU%3E"class="anchor"></a><h3class="code-header in-band">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3></div></summary><divclass="impl-items"><detailsclass="rustdoc-toggle"open><summary><divid="associatedtype.Error"class="type trait-impl has-srclink"><ahref="#associatedtype.Error"class="anchor"></a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a></h4></div></summary><divclass='docblock'><p>The type returned in the event of a conversion error.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><divid="method.try_into"class="method trait-impl has-srclink"><divclass="rightside"><aclass="srclink"href="https://doc.rust-lang.org/1.59.0/src/core/convert/mod.rs.html#580"title="goto source code">[src]</a></div><ahref="#method.try_into"class="anchor"></a><h4class="code-header">pub fn <ahref="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryInto.html#tymethod.try_into"class="fnname">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.59.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.59.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.59.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></div></summary><divclass='docblock'><p>Performs the conversion.</p>