Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 0c2243f8a1696816431e7210e991fa52 > files > 14933

rust-doc-1.35.0-1.mga7.armv7hl.rpm

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `OsString` struct in crate `std`."><meta name="keywords" content="rust, rustlang, rust-lang, OsString"><title>std::ffi::OsString - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize1.35.0.css"><link rel="stylesheet" type="text/css" href="../../rustdoc1.35.0.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark1.35.0.css"><link rel="stylesheet" type="text/css" href="../../light1.35.0.css" id="themeStyle"><script src="../../storage1.35.0.js"></script><noscript><link rel="stylesheet" href="../../noscript1.35.0.css"></noscript><link rel="shortcut icon" href="../../favicon1.35.0.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow1.35.0.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../std/index.html'><img src='../../rust-logo1.35.0.png' alt='logo' width='100'></a><p class='location'>Struct OsString</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.as_os_str">as_os_str</a><a href="#method.capacity">capacity</a><a href="#method.clear">clear</a><a href="#method.into_boxed_os_str">into_boxed_os_str</a><a href="#method.into_string">into_string</a><a href="#method.new">new</a><a href="#method.push">push</a><a href="#method.reserve">reserve</a><a href="#method.reserve_exact">reserve_exact</a><a href="#method.shrink_to">shrink_to</a><a href="#method.shrink_to_fit">shrink_to_fit</a><a href="#method.with_capacity">with_capacity</a></div><a class="sidebar-title" href="#deref-methods">Methods from Deref&lt;Target=OsStr&gt;</a><div class="sidebar-links"><a href="#method.is_empty">is_empty</a><a href="#method.len">len</a><a href="#method.to_os_string">to_os_string</a><a href="#method.to_str">to_str</a><a href="#method.to_string_lossy">to_string_lossy</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-AsRef%3COsStr%3E">AsRef&lt;OsStr&gt;</a><a href="#impl-AsRef%3CPath%3E">AsRef&lt;Path&gt;</a><a href="#impl-Borrow%3COsStr%3E">Borrow&lt;OsStr&gt;</a><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a><a href="#impl-Deref">Deref</a><a href="#impl-Eq">Eq</a><a href="#impl-From%3C%26%27_%20T%3E">From&lt;&amp;&#39;_ T&gt;</a><a href="#impl-From%3C%26%27a%20OsString%3E">From&lt;&amp;&#39;a OsString&gt;</a><a href="#impl-From%3CBox%3COsStr%3E%3E">From&lt;Box&lt;OsStr&gt;&gt;</a><a href="#impl-From%3CCow%3C%27a%2C%20OsStr%3E%3E">From&lt;Cow&lt;&#39;a, OsStr&gt;&gt;</a><a href="#impl-From%3COsString%3E">From&lt;OsString&gt;</a><a href="#impl-From%3CPathBuf%3E">From&lt;PathBuf&gt;</a><a href="#impl-From%3CString%3E">From&lt;String&gt;</a><a href="#impl-Hash">Hash</a><a href="#impl-Index%3CRangeFull%3E">Index&lt;RangeFull&gt;</a><a href="#impl-Ord">Ord</a><a href="#impl-OsStringExt">OsStringExt</a><a href="#impl-PartialEq%3C%26%27_%20str%3E">PartialEq&lt;&amp;&#39;_ str&gt;</a><a href="#impl-PartialEq%3C%26%27a%20OsStr%3E">PartialEq&lt;&amp;&#39;a OsStr&gt;</a><a href="#impl-PartialEq%3C%26%27a%20Path%3E">PartialEq&lt;&amp;&#39;a Path&gt;</a><a href="#impl-PartialEq%3CCow%3C%27a%2C%20OsStr%3E%3E">PartialEq&lt;Cow&lt;&#39;a, OsStr&gt;&gt;</a><a href="#impl-PartialEq%3CCow%3C%27a%2C%20Path%3E%3E">PartialEq&lt;Cow&lt;&#39;a, Path&gt;&gt;</a><a href="#impl-PartialEq%3COsStr%3E">PartialEq&lt;OsStr&gt;</a><a href="#impl-PartialEq%3COsString%3E">PartialEq&lt;OsString&gt;</a><a href="#impl-PartialEq%3CPath%3E">PartialEq&lt;Path&gt;</a><a href="#impl-PartialEq%3CPathBuf%3E">PartialEq&lt;PathBuf&gt;</a><a href="#impl-PartialEq%3Cstr%3E">PartialEq&lt;str&gt;</a><a href="#impl-PartialOrd%3C%26%27a%20OsStr%3E">PartialOrd&lt;&amp;&#39;a OsStr&gt;</a><a href="#impl-PartialOrd%3C%26%27a%20Path%3E">PartialOrd&lt;&amp;&#39;a Path&gt;</a><a href="#impl-PartialOrd%3CCow%3C%27a%2C%20OsStr%3E%3E">PartialOrd&lt;Cow&lt;&#39;a, OsStr&gt;&gt;</a><a href="#impl-PartialOrd%3CCow%3C%27a%2C%20Path%3E%3E">PartialOrd&lt;Cow&lt;&#39;a, Path&gt;&gt;</a><a href="#impl-PartialOrd%3COsStr%3E">PartialOrd&lt;OsStr&gt;</a><a href="#impl-PartialOrd%3COsString%3E">PartialOrd&lt;OsString&gt;</a><a href="#impl-PartialOrd%3CPath%3E">PartialOrd&lt;Path&gt;</a><a href="#impl-PartialOrd%3CPathBuf%3E">PartialOrd&lt;PathBuf&gt;</a><a href="#impl-PartialOrd%3Cstr%3E">PartialOrd&lt;str&gt;</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow">Borrow</a><a href="#impl-BorrowMut">BorrowMut</a><a href="#impl-From">From</a><a href="#impl-Into">Into</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom">TryFrom</a><a href="#impl-TryInto">TryInto</a></div></div><p class='location'><a href='../index.html'>std</a>::<wbr><a href='index.html'>ffi</a></p><script>window.sidebarCurrent = {name: 'OsString', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush1.35.0.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme1.35.0.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel1.35.0.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/std/ffi/os_str.rs.html#80-82' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>std</a>::<wbr><a href='index.html'>ffi</a>::<wbr><a class="struct" href=''>OsString</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct OsString { /* fields omitted */ }</pre></div><div class='docblock'><p>A type that can represent owned, mutable platform-native strings, but is
cheaply inter-convertible with Rust strings.</p>
<p>The need for this type arises from the fact that:</p>
<ul>
<li>
<p>On Unix systems, strings are often arbitrary sequences of non-zero
bytes, in many cases interpreted as UTF-8.</p>
</li>
<li>
<p>On Windows, strings are often arbitrary sequences of non-zero 16-bit
values, interpreted as UTF-16 when it is valid to do so.</p>
</li>
<li>
<p>In Rust, strings are always valid UTF-8, which may contain zeros.</p>
</li>
</ul>
<p><code>OsString</code> and <a href="struct.OsStr.html"><code>OsStr</code></a> bridge this gap by simultaneously representing Rust
and platform-native string values, and in particular allowing a Rust string
to be converted into an &quot;OS&quot; string with no cost if possible. A consequence
of this is that <code>OsString</code> instances are <em>not</em> <code>NUL</code> terminated; in order
to pass to e.g., Unix system call, you should create a <a href="struct.CStr.html"><code>CStr</code></a>.</p>
<p><code>OsString</code> is to <a href="struct.OsStr.html"><code>&amp;OsStr</code></a> as <a href="../string/struct.String.html"><code>String</code></a> is to <a href="../primitive.str.html"><code>&amp;str</code></a>: the former
in each pair are owned strings; the latter are borrowed
references.</p>
<p>Note, <code>OsString</code> and <code>OsStr</code> internally do not necessarily hold strings in
the form native to the platform; While on Unix, strings are stored as a
sequence of 8-bit values, on Windows, where strings are 16-bit value based
as just discussed, strings are also actually stored as a sequence of 8-bit
values, encoded in a less-strict variant of UTF-8. This is useful to
understand when handling capacity and length values.</p>
<h1 id="creating-an-osstring" class="section-header"><a href="#creating-an-osstring">Creating an <code>OsString</code></a></h1>
<p><strong>From a Rust string</strong>: <code>OsString</code> implements
<a href="../convert/trait.From.html"><code>From</code></a><code>&lt;</code><a href="../string/struct.String.html"><code>String</code></a><code>&gt;</code>, so you can use <code>my_string.from</code> to
create an <code>OsString</code> from a normal Rust string.</p>
<p><strong>From slices:</strong> Just like you can start with an empty Rust
<a href="../string/struct.String.html"><code>String</code></a> and then <a href="../string/struct.String.html#method.push_str"><code>push_str</code></a> <code>&amp;str</code>
sub-string slices into it, you can create an empty <code>OsString</code> with
the <a href="#method.new"><code>new</code></a> method and then push string slices into it with the
<a href="#method.push"><code>push</code></a> method.</p>
<h1 id="extracting-a-borrowed-reference-to-the-whole-os-string" class="section-header"><a href="#extracting-a-borrowed-reference-to-the-whole-os-string">Extracting a borrowed reference to the whole OS string</a></h1>
<p>You can use the <a href="#method.as_os_str"><code>as_os_str</code></a> method to get an <code>&amp;</code><a href="struct.OsStr.html"><code>OsStr</code></a> from
an <code>OsString</code>; this is effectively a borrowed reference to the
whole string.</p>
<h1 id="conversions" class="section-header"><a href="#conversions">Conversions</a></h1>
<p>See the <a href="index.html#conversions">module's toplevel documentation about conversions</a> for a discussion on
the traits which <code>OsString</code> implements for <a href="index.html#conversions">conversions</a> from/to native representations.</p>
</div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/std/ffi/os_str.rs.html#104-347' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code id='new.v'>pub fn <a href='#method.new' class='fnname'>new</a>() -&gt; <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#115-117' title='goto source code'>[src]</a></h4><div class='docblock'><p>Constructs a new empty <code>OsString</code>.</p>
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::<span class="ident">OsString</span>;

<span class="kw">let</span> <span class="ident">os_string</span> <span class="op">=</span> <span class="ident">OsString</span>::<span class="ident">new</span>();<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Affi%3A%3AOsString%3B%0A%0Alet%20os_string%20%3D%20OsString%3A%3Anew()%3B%0A%7D">Run</a></pre></div>
</div><h4 id='method.as_os_str' class="method"><code id='as_os_str.v'>pub fn <a href='#method.as_os_str' class='fnname'>as_os_str</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#133-135' title='goto source code'>[src]</a></h4><div class='docblock'><p>Converts to an <a href="struct.OsStr.html"><code>OsStr</code></a> slice.</p>
<h1 id="examples-1" class="section-header"><a href="#examples-1">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::{<span class="ident">OsString</span>, <span class="ident">OsStr</span>};

<span class="kw">let</span> <span class="ident">os_string</span> <span class="op">=</span> <span class="ident">OsString</span>::<span class="ident">from</span>(<span class="string">&quot;foo&quot;</span>);
<span class="kw">let</span> <span class="ident">os_str</span> <span class="op">=</span> <span class="ident">OsStr</span>::<span class="ident">new</span>(<span class="string">&quot;foo&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">os_string</span>.<span class="ident">as_os_str</span>(), <span class="ident">os_str</span>);<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Affi%3A%3A%7BOsString%2C%20OsStr%7D%3B%0A%0Alet%20os_string%20%3D%20OsString%3A%3Afrom(%22foo%22)%3B%0Alet%20os_str%20%3D%20OsStr%3A%3Anew(%22foo%22)%3B%0Aassert_eq!(os_string.as_os_str()%2C%20os_str)%3B%0A%7D">Run</a></pre></div>
</div><h4 id='method.into_string' class="method"><code id='into_string.v'>pub fn <a href='#method.into_string' class='fnname'>into_string</a>(self) -&gt; <a class="enum" href="../../std/result/enum.Result.html" title="enum std::result::Result">Result</a>&lt;<a class="struct" href="../../std/string/struct.String.html" title="struct std::string::String">String</a>, <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt;</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#153-155' title='goto source code'>[src]</a></h4><div class='docblock'><p>Converts the <code>OsString</code> into a <a href="../../std/string/struct.String.html"><code>String</code></a> if it contains valid Unicode data.</p>
<p>On failure, ownership of the original <code>OsString</code> is returned.</p>
<h1 id="examples-2" class="section-header"><a href="#examples-2">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::<span class="ident">OsString</span>;

<span class="kw">let</span> <span class="ident">os_string</span> <span class="op">=</span> <span class="ident">OsString</span>::<span class="ident">from</span>(<span class="string">&quot;foo&quot;</span>);
<span class="kw">let</span> <span class="ident">string</span> <span class="op">=</span> <span class="ident">os_string</span>.<span class="ident">into_string</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">string</span>, <span class="prelude-val">Ok</span>(<span class="ident">String</span>::<span class="ident">from</span>(<span class="string">&quot;foo&quot;</span>)));<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Affi%3A%3AOsString%3B%0A%0Alet%20os_string%20%3D%20OsString%3A%3Afrom(%22foo%22)%3B%0Alet%20string%20%3D%20os_string.into_string()%3B%0Aassert_eq!(string%2C%20Ok(String%3A%3Afrom(%22foo%22)))%3B%0A%7D">Run</a></pre></div>
</div><h4 id='method.push' class="method"><code id='push.v'>pub fn <a href='#method.push' class='fnname'>push</a>&lt;T:&nbsp;<a class="trait" href="../../std/convert/trait.AsRef.html" title="trait std::convert::AsRef">AsRef</a>&lt;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;&gt;(&amp;mut self, s: T)</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#171-173' title='goto source code'>[src]</a></h4><div class='docblock'><p>Extends the string with the given <a href="struct.OsStr.html"><code>&amp;OsStr</code></a> slice.</p>
<h1 id="examples-3" class="section-header"><a href="#examples-3">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::<span class="ident">OsString</span>;

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">os_string</span> <span class="op">=</span> <span class="ident">OsString</span>::<span class="ident">from</span>(<span class="string">&quot;foo&quot;</span>);
<span class="ident">os_string</span>.<span class="ident">push</span>(<span class="string">&quot;bar&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">os_string</span>, <span class="string">&quot;foobar&quot;</span>);<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Affi%3A%3AOsString%3B%0A%0Alet%20mut%20os_string%20%3D%20OsString%3A%3Afrom(%22foo%22)%3B%0Aos_string.push(%22bar%22)%3B%0Aassert_eq!(%26os_string%2C%20%22foobar%22)%3B%0A%7D">Run</a></pre></div>
</div><h4 id='method.with_capacity' class="method"><code id='with_capacity.v'>pub fn <a href='#method.with_capacity' class='fnname'>with_capacity</a>(capacity: <a class="primitive" href="../primitive.usize.html">usize</a>) -&gt; <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><div class='since' title='Stable since Rust version 1.9.0'>1.9.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#197-201' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a new <code>OsString</code> with the given capacity.</p>
<p>The string will be able to hold exactly <code>capacity</code> length units of other
OS strings without reallocating. If <code>capacity</code> is 0, the string will not
allocate.</p>
<p>See main <code>OsString</code> documentation information about encoding.</p>
<h1 id="examples-4" class="section-header"><a href="#examples-4">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::<span class="ident">OsString</span>;

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">os_string</span> <span class="op">=</span> <span class="ident">OsString</span>::<span class="ident">with_capacity</span>(<span class="number">10</span>);
<span class="kw">let</span> <span class="ident">capacity</span> <span class="op">=</span> <span class="ident">os_string</span>.<span class="ident">capacity</span>();

<span class="comment">// This push is done without reallocating</span>
<span class="ident">os_string</span>.<span class="ident">push</span>(<span class="string">&quot;foo&quot;</span>);

<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">capacity</span>, <span class="ident">os_string</span>.<span class="ident">capacity</span>());<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Affi%3A%3AOsString%3B%0A%0Alet%20mut%20os_string%20%3D%20OsString%3A%3Awith_capacity(10)%3B%0Alet%20capacity%20%3D%20os_string.capacity()%3B%0A%0A%2F%2F%20This%20push%20is%20done%20without%20reallocating%0Aos_string.push(%22foo%22)%3B%0A%0Aassert_eq!(capacity%2C%20os_string.capacity())%3B%0A%7D">Run</a></pre></div>
</div><h4 id='method.clear' class="method"><code id='clear.v'>pub fn <a href='#method.clear' class='fnname'>clear</a>(&amp;mut self)</code><div class='since' title='Stable since Rust version 1.9.0'>1.9.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#217-219' title='goto source code'>[src]</a></h4><div class='docblock'><p>Truncates the <code>OsString</code> to zero length.</p>
<h1 id="examples-5" class="section-header"><a href="#examples-5">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::<span class="ident">OsString</span>;

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">os_string</span> <span class="op">=</span> <span class="ident">OsString</span>::<span class="ident">from</span>(<span class="string">&quot;foo&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">os_string</span>, <span class="string">&quot;foo&quot;</span>);

<span class="ident">os_string</span>.<span class="ident">clear</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">&amp;</span><span class="ident">os_string</span>, <span class="string">&quot;&quot;</span>);<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Affi%3A%3AOsString%3B%0A%0Alet%20mut%20os_string%20%3D%20OsString%3A%3Afrom(%22foo%22)%3B%0Aassert_eq!(%26os_string%2C%20%22foo%22)%3B%0A%0Aos_string.clear()%3B%0Aassert_eq!(%26os_string%2C%20%22%22)%3B%0A%7D">Run</a></pre></div>
</div><h4 id='method.capacity' class="method"><code id='capacity.v'>pub fn <a href='#method.capacity' class='fnname'>capacity</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.usize.html">usize</a></code><div class='since' title='Stable since Rust version 1.9.0'>1.9.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#234-236' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the capacity this <code>OsString</code> can hold without reallocating.</p>
<p>See <code>OsString</code> introduction for information about encoding.</p>
<h1 id="examples-6" class="section-header"><a href="#examples-6">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::<span class="ident">OsString</span>;

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">os_string</span> <span class="op">=</span> <span class="ident">OsString</span>::<span class="ident">with_capacity</span>(<span class="number">10</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">os_string</span>.<span class="ident">capacity</span>() <span class="op">&gt;=</span> <span class="number">10</span>);<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Affi%3A%3AOsString%3B%0A%0Alet%20mut%20os_string%20%3D%20OsString%3A%3Awith_capacity(10)%3B%0Aassert!(os_string.capacity()%20%3E%3D%2010)%3B%0A%7D">Run</a></pre></div>
</div><h4 id='method.reserve' class="method"><code id='reserve.v'>pub fn <a href='#method.reserve' class='fnname'>reserve</a>(&amp;mut self, additional: <a class="primitive" href="../primitive.usize.html">usize</a>)</code><div class='since' title='Stable since Rust version 1.9.0'>1.9.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#253-255' title='goto source code'>[src]</a></h4><div class='docblock'><p>Reserves capacity for at least <code>additional</code> more capacity to be inserted
in the given <code>OsString</code>.</p>
<p>The collection may reserve more space to avoid frequent reallocations.</p>
<h1 id="examples-7" class="section-header"><a href="#examples-7">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::<span class="ident">OsString</span>;

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">OsString</span>::<span class="ident">new</span>();
<span class="ident">s</span>.<span class="ident">reserve</span>(<span class="number">10</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">capacity</span>() <span class="op">&gt;=</span> <span class="number">10</span>);<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Affi%3A%3AOsString%3B%0A%0Alet%20mut%20s%20%3D%20OsString%3A%3Anew()%3B%0As.reserve(10)%3B%0Aassert!(s.capacity()%20%3E%3D%2010)%3B%0A%7D">Run</a></pre></div>
</div><h4 id='method.reserve_exact' class="method"><code id='reserve_exact.v'>pub fn <a href='#method.reserve_exact' class='fnname'>reserve_exact</a>(&amp;mut self, additional: <a class="primitive" href="../primitive.usize.html">usize</a>)</code><div class='since' title='Stable since Rust version 1.9.0'>1.9.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#275-277' title='goto source code'>[src]</a></h4><div class='docblock'><p>Reserves the minimum capacity for exactly <code>additional</code> more capacity to
be inserted in the given <code>OsString</code>. Does nothing if the capacity is
already sufficient.</p>
<p>Note that the allocator may give the collection more space than it
requests. Therefore, capacity can not be relied upon to be precisely
minimal. Prefer reserve if future insertions are expected.</p>
<h1 id="examples-8" class="section-header"><a href="#examples-8">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::<span class="ident">OsString</span>;

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">OsString</span>::<span class="ident">new</span>();
<span class="ident">s</span>.<span class="ident">reserve_exact</span>(<span class="number">10</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">capacity</span>() <span class="op">&gt;=</span> <span class="number">10</span>);<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Affi%3A%3AOsString%3B%0A%0Alet%20mut%20s%20%3D%20OsString%3A%3Anew()%3B%0As.reserve_exact(10)%3B%0Aassert!(s.capacity()%20%3E%3D%2010)%3B%0A%7D">Run</a></pre></div>
</div><h4 id='method.shrink_to_fit' class="method"><code id='shrink_to_fit.v'>pub fn <a href='#method.shrink_to_fit' class='fnname'>shrink_to_fit</a>(&amp;mut self)</code><div class='since' title='Stable since Rust version 1.19.0'>1.19.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#295-297' title='goto source code'>[src]</a></h4><div class='docblock'><p>Shrinks the capacity of the <code>OsString</code> to match its length.</p>
<h1 id="examples-9" class="section-header"><a href="#examples-9">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::<span class="ident">OsString</span>;

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">OsString</span>::<span class="ident">from</span>(<span class="string">&quot;foo&quot;</span>);

<span class="ident">s</span>.<span class="ident">reserve</span>(<span class="number">100</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">capacity</span>() <span class="op">&gt;=</span> <span class="number">100</span>);

<span class="ident">s</span>.<span class="ident">shrink_to_fit</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">3</span>, <span class="ident">s</span>.<span class="ident">capacity</span>());<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Affi%3A%3AOsString%3B%0A%0Alet%20mut%20s%20%3D%20OsString%3A%3Afrom(%22foo%22)%3B%0A%0As.reserve(100)%3B%0Aassert!(s.capacity()%20%3E%3D%20100)%3B%0A%0As.shrink_to_fit()%3B%0Aassert_eq!(3%2C%20s.capacity())%3B%0A%7D">Run</a></pre></div>
</div><h4 id='method.shrink_to' class="method"><code id='shrink_to.v'>pub fn <a href='#method.shrink_to' class='fnname'>shrink_to</a>(&amp;mut self, min_capacity: <a class="primitive" href="../primitive.usize.html">usize</a>)</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#325-327' title='goto source code'>[src]</a></h4><div class='stability'><div class='stab unstable'><details><summary><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>shrink_to</code>&nbsp;<a href="https://github.com/rust-lang/rust/issues/56431">#56431</a>)</summary><p>new API</p>
</details></div></div><div class='docblock'><p>Shrinks the capacity of the <code>OsString</code> with a lower bound.</p>
<p>The capacity will remain at least as large as both the length
and the supplied value.</p>
<p>Panics if the current capacity is smaller than the supplied
minimum capacity.</p>
<h1 id="examples-10" class="section-header"><a href="#examples-10">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="attribute">#![<span class="ident">feature</span>(<span class="ident">shrink_to</span>)]</span>
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::<span class="ident">OsString</span>;

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">OsString</span>::<span class="ident">from</span>(<span class="string">&quot;foo&quot;</span>);

<span class="ident">s</span>.<span class="ident">reserve</span>(<span class="number">100</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">capacity</span>() <span class="op">&gt;=</span> <span class="number">100</span>);

<span class="ident">s</span>.<span class="ident">shrink_to</span>(<span class="number">10</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">capacity</span>() <span class="op">&gt;=</span> <span class="number">10</span>);
<span class="ident">s</span>.<span class="ident">shrink_to</span>(<span class="number">0</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">s</span>.<span class="ident">capacity</span>() <span class="op">&gt;=</span> <span class="number">3</span>);<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(shrink_to)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Affi%3A%3AOsString%3B%0A%0Alet%20mut%20s%20%3D%20OsString%3A%3Afrom(%22foo%22)%3B%0A%0As.reserve(100)%3B%0Aassert!(s.capacity()%20%3E%3D%20100)%3B%0A%0As.shrink_to(10)%3B%0Aassert!(s.capacity()%20%3E%3D%2010)%3B%0As.shrink_to(0)%3B%0Aassert!(s.capacity()%20%3E%3D%203)%3B%0A%7D&amp;version=nightly">Run</a></pre></div>
</div><h4 id='method.into_boxed_os_str' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;I&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;I&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;I&gt; <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a> for <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;I&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">    type <a href='../../std/iter/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = &lt;I as <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a>&gt;::<a class="type" href="../../std/iter/trait.Iterator.html#associatedtype.Item" title="type std::iter::Iterator::Item">Item</a>;</span><span class="where fmt-newline">impl&lt;F&gt; <a class="trait" href="../../std/future/trait.Future.html" title="trait std::future::Future">Future</a> for <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="../../std/marker/trait.Unpin.html" title="trait std::marker::Unpin">Unpin</a> + <a class="trait" href="../../std/future/trait.Future.html" title="trait std::future::Future">Future</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">    type <a href='../../std/future/trait.Future.html#associatedtype.Output' class="type">Output</a> = &lt;F as <a class="trait" href="../../std/future/trait.Future.html" title="trait std::future::Future">Future</a>&gt;::<a class="type" href="../../std/future/trait.Future.html#associatedtype.Output" title="type std::future::Future::Output">Output</a>;</span><span class="where fmt-newline">impl&lt;R:&nbsp;<a class="trait" href="../../std/io/trait.Read.html" title="trait std::io::Read">Read</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>&gt; <a class="trait" href="../../std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;R&gt;</span><span class="where fmt-newline">impl&lt;W:&nbsp;<a class="trait" href="../../std/io/trait.Write.html" title="trait std::io::Write">Write</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>&gt; <a class="trait" href="../../std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;W&gt;</span></code></div></div><code id='into_boxed_os_str.v'>pub fn <a href='#method.into_boxed_os_str' class='fnname'>into_boxed_os_str</a>(self) -&gt; <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;</code><div class='since' title='Stable since Rust version 1.20.0'>1.20.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#343-346' title='goto source code'>[src]</a></h4><div class='docblock'><p>Converts this <code>OsString</code> into a boxed <a href="struct.OsStr.html"><code>OsStr</code></a>.</p>
<h1 id="examples-11" class="section-header"><a href="#examples-11">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::{<span class="ident">OsString</span>, <span class="ident">OsStr</span>};

<span class="kw">let</span> <span class="ident">s</span> <span class="op">=</span> <span class="ident">OsString</span>::<span class="ident">from</span>(<span class="string">&quot;hello&quot;</span>);

<span class="kw">let</span> <span class="ident">b</span>: <span class="ident">Box</span><span class="op">&lt;</span><span class="ident">OsStr</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">s</span>.<span class="ident">into_boxed_os_str</span>();<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Affi%3A%3A%7BOsString%2C%20OsStr%7D%3B%0A%0Alet%20s%20%3D%20OsString%3A%3Afrom(%22hello%22)%3B%0A%0Alet%20b%3A%20Box%3COsStr%3E%20%3D%20s.into_boxed_os_str()%3B%0A%7D">Run</a></pre></div>
</div></div><h2 id='deref-methods' class='small-section-header'>Methods from <a class="trait" href="../../std/ops/trait.Deref.html" title="trait std::ops::Deref">Deref</a>&lt;Target = <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;<a href='#deref-methods' class='anchor'></a></h2><div class='impl-items'><h4 id='method.to_str' class="method"><code id='to_str.v'>pub fn <a href='#method.to_str' class='fnname'>to_str</a>(&amp;self) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;&amp;<a class="primitive" href="../primitive.str.html">str</a>&gt;</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#514-516' title='goto source code'>[src]</a></h4><div class='docblock'><p>Yields a <a href="../../std/primitive.str.html"><code>&amp;str</code></a> slice if the <code>OsStr</code> is valid Unicode.</p>
<p>This conversion may entail doing a check for UTF-8 validity.</p>
<h1 id="examples-12" class="section-header"><a href="#examples-12">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::<span class="ident">OsStr</span>;

<span class="kw">let</span> <span class="ident">os_str</span> <span class="op">=</span> <span class="ident">OsStr</span>::<span class="ident">new</span>(<span class="string">&quot;foo&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">os_str</span>.<span class="ident">to_str</span>(), <span class="prelude-val">Some</span>(<span class="string">&quot;foo&quot;</span>));<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Affi%3A%3AOsStr%3B%0A%0Alet%20os_str%20%3D%20OsStr%3A%3Anew(%22foo%22)%3B%0Aassert_eq!(os_str.to_str()%2C%20Some(%22foo%22))%3B%0A%7D">Run</a></pre></div>
</div><h4 id='method.to_string_lossy' class="method"><code id='to_string_lossy.v'>pub fn <a href='#method.to_string_lossy' class='fnname'>to_string_lossy</a>(&amp;self) -&gt; <a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;<a class="primitive" href="../primitive.str.html">str</a>&gt;</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#566-568' title='goto source code'>[src]</a></h4><div class='docblock'><p>Converts an <code>OsStr</code> to a <a href="../../std/borrow/enum.Cow.html"><code>Cow</code></a><code>&lt;</code><a href="../../std/primitive.str.html"><code>str</code></a><code>&gt;</code>.</p>
<p>Any non-Unicode sequences are replaced with
<a href="../../std/char/constant.REPLACEMENT_CHARACTER.html"><code>U+FFFD REPLACEMENT CHARACTER</code></a>.</p>
<h1 id="examples-13" class="section-header"><a href="#examples-13">Examples</a></h1>
<p>Calling <code>to_string_lossy</code> on an <code>OsStr</code> with invalid unicode:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="comment">// Note, due to differences in how Unix and Windows represent strings,</span>
<span class="comment">// we are forced to complicate this example, setting up example `OsStr`s</span>
<span class="comment">// with different source data and via different platform extensions.</span>
<span class="comment">// Understand that in reality you could end up with such example invalid</span>
<span class="comment">// sequences simply through collecting user command line arguments, for</span>
<span class="comment">// example.</span>

<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">any</span>(<span class="ident">unix</span>, <span class="ident">target_os</span> <span class="op">=</span> <span class="string">&quot;redox&quot;</span>))]</span> {
    <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::<span class="ident">OsStr</span>;
    <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">os</span>::<span class="ident">unix</span>::<span class="ident">ffi</span>::<span class="ident">OsStrExt</span>;

    <span class="comment">// Here, the values 0x66 and 0x6f correspond to &#39;f&#39; and &#39;o&#39;</span>
    <span class="comment">// respectively. The value 0x80 is a lone continuation byte, invalid</span>
    <span class="comment">// in a UTF-8 sequence.</span>
    <span class="kw">let</span> <span class="ident">source</span> <span class="op">=</span> [<span class="number">0x66</span>, <span class="number">0x6f</span>, <span class="number">0x80</span>, <span class="number">0x6f</span>];
    <span class="kw">let</span> <span class="ident">os_str</span> <span class="op">=</span> <span class="ident">OsStr</span>::<span class="ident">from_bytes</span>(<span class="kw-2">&amp;</span><span class="ident">source</span>[..]);

    <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">os_str</span>.<span class="ident">to_string_lossy</span>(), <span class="string">&quot;fo�o&quot;</span>);
}
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">windows</span>)]</span> {
    <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::<span class="ident">OsString</span>;
    <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">os</span>::<span class="ident">windows</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;

    <span class="comment">// Here the values 0x0066 and 0x006f correspond to &#39;f&#39; and &#39;o&#39;</span>
    <span class="comment">// respectively. The value 0xD800 is a lone surrogate half, invalid</span>
    <span class="comment">// in a UTF-16 sequence.</span>
    <span class="kw">let</span> <span class="ident">source</span> <span class="op">=</span> [<span class="number">0x0066</span>, <span class="number">0x006f</span>, <span class="number">0xD800</span>, <span class="number">0x006f</span>];
    <span class="kw">let</span> <span class="ident">os_string</span> <span class="op">=</span> <span class="ident">OsString</span>::<span class="ident">from_wide</span>(<span class="kw-2">&amp;</span><span class="ident">source</span>[..]);
    <span class="kw">let</span> <span class="ident">os_str</span> <span class="op">=</span> <span class="ident">os_string</span>.<span class="ident">as_os_str</span>();

    <span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">os_str</span>.<span class="ident">to_string_lossy</span>(), <span class="string">&quot;fo�o&quot;</span>);
}<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0A%2F%2F%20Note%2C%20due%20to%20differences%20in%20how%20Unix%20and%20Windows%20represent%20strings%2C%0A%2F%2F%20we%20are%20forced%20to%20complicate%20this%20example%2C%20setting%20up%20example%20%60OsStr%60s%0A%2F%2F%20with%20different%20source%20data%20and%20via%20different%20platform%20extensions.%0A%2F%2F%20Understand%20that%20in%20reality%20you%20could%20end%20up%20with%20such%20example%20invalid%0A%2F%2F%20sequences%20simply%20through%20collecting%20user%20command%20line%20arguments%2C%20for%0A%2F%2F%20example.%0A%0Afn%20main()%20%7B%0A%23%5Bcfg(any(unix%2C%20target_os%20%3D%20%22redox%22))%5D%20%7B%0A%20%20%20%20use%20std%3A%3Affi%3A%3AOsStr%3B%0A%20%20%20%20use%20std%3A%3Aos%3A%3Aunix%3A%3Affi%3A%3AOsStrExt%3B%0A%0A%20%20%20%20%2F%2F%20Here%2C%20the%20values%200x66%20and%200x6f%20correspond%20to%20'f'%20and%20'o'%0A%20%20%20%20%2F%2F%20respectively.%20The%20value%200x80%20is%20a%20lone%20continuation%20byte%2C%20invalid%0A%20%20%20%20%2F%2F%20in%20a%20UTF-8%20sequence.%0A%20%20%20%20let%20source%20%3D%20%5B0x66%2C%200x6f%2C%200x80%2C%200x6f%5D%3B%0A%20%20%20%20let%20os_str%20%3D%20OsStr%3A%3Afrom_bytes(%26source%5B..%5D)%3B%0A%0A%20%20%20%20assert_eq!(os_str.to_string_lossy()%2C%20%22fo%EF%BF%BDo%22)%3B%0A%7D%0A%23%5Bcfg(windows)%5D%20%7B%0A%20%20%20%20use%20std%3A%3Affi%3A%3AOsString%3B%0A%20%20%20%20use%20std%3A%3Aos%3A%3Awindows%3A%3Aprelude%3A%3A*%3B%0A%0A%20%20%20%20%2F%2F%20Here%20the%20values%200x0066%20and%200x006f%20correspond%20to%20'f'%20and%20'o'%0A%20%20%20%20%2F%2F%20respectively.%20The%20value%200xD800%20is%20a%20lone%20surrogate%20half%2C%20invalid%0A%20%20%20%20%2F%2F%20in%20a%20UTF-16%20sequence.%0A%20%20%20%20let%20source%20%3D%20%5B0x0066%2C%200x006f%2C%200xD800%2C%200x006f%5D%3B%0A%20%20%20%20let%20os_string%20%3D%20OsString%3A%3Afrom_wide(%26source%5B..%5D)%3B%0A%20%20%20%20let%20os_str%20%3D%20os_string.as_os_str()%3B%0A%0A%20%20%20%20assert_eq!(os_str.to_string_lossy()%2C%20%22fo%EF%BF%BDo%22)%3B%0A%7D%0A%7D">Run</a></pre></div>
</div><h4 id='method.to_os_string' class="method"><code id='to_os_string.v'>pub fn <a href='#method.to_os_string' class='fnname'>to_os_string</a>(&amp;self) -&gt; <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#584-586' title='goto source code'>[src]</a></h4><div class='docblock'><p>Copies the slice into an owned <a href="struct.OsString.html"><code>OsString</code></a>.</p>
<h1 id="examples-14" class="section-header"><a href="#examples-14">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::{<span class="ident">OsStr</span>, <span class="ident">OsString</span>};

<span class="kw">let</span> <span class="ident">os_str</span> <span class="op">=</span> <span class="ident">OsStr</span>::<span class="ident">new</span>(<span class="string">&quot;foo&quot;</span>);
<span class="kw">let</span> <span class="ident">os_string</span> <span class="op">=</span> <span class="ident">os_str</span>.<span class="ident">to_os_string</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">os_string</span>, <span class="ident">OsString</span>::<span class="ident">from</span>(<span class="string">&quot;foo&quot;</span>));<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Affi%3A%3A%7BOsStr%2C%20OsString%7D%3B%0A%0Alet%20os_str%20%3D%20OsStr%3A%3Anew(%22foo%22)%3B%0Alet%20os_string%20%3D%20os_str.to_os_string()%3B%0Aassert_eq!(os_string%2C%20OsString%3A%3Afrom(%22foo%22))%3B%0A%7D">Run</a></pre></div>
</div><h4 id='method.is_empty' class="method"><code id='is_empty.v'>pub fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><div class='since' title='Stable since Rust version 1.9.0'>1.9.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#602-604' title='goto source code'>[src]</a></h4><div class='docblock'><p>Checks whether the <code>OsStr</code> is empty.</p>
<h1 id="examples-15" class="section-header"><a href="#examples-15">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::<span class="ident">OsStr</span>;

<span class="kw">let</span> <span class="ident">os_str</span> <span class="op">=</span> <span class="ident">OsStr</span>::<span class="ident">new</span>(<span class="string">&quot;&quot;</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">os_str</span>.<span class="ident">is_empty</span>());

<span class="kw">let</span> <span class="ident">os_str</span> <span class="op">=</span> <span class="ident">OsStr</span>::<span class="ident">new</span>(<span class="string">&quot;foo&quot;</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="op">!</span><span class="ident">os_str</span>.<span class="ident">is_empty</span>());<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Affi%3A%3AOsStr%3B%0A%0Alet%20os_str%20%3D%20OsStr%3A%3Anew(%22%22)%3B%0Aassert!(os_str.is_empty())%3B%0A%0Alet%20os_str%20%3D%20OsStr%3A%3Anew(%22foo%22)%3B%0Aassert!(!os_str.is_empty())%3B%0A%7D">Run</a></pre></div>
</div><h4 id='method.len' class="method"><code id='len.v'>pub fn <a href='#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.usize.html">usize</a></code><div class='since' title='Stable since Rust version 1.9.0'>1.9.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#635-637' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the length of this <code>OsStr</code>.</p>
<p>Note that this does <strong>not</strong> return the number of bytes in the string in
OS string form.</p>
<p>The length returned is that of the underlying storage used by <code>OsStr</code>;
As discussed in the <a href="struct.OsString.html"><code>OsString</code></a> introduction, <a href="struct.OsString.html"><code>OsString</code></a> and <code>OsStr</code>
store strings in a form best suited for cheap inter-conversion between
native-platform and Rust string forms, which may differ significantly
from both of them, including in storage size and encoding.</p>
<p>This number is simply useful for passing to other methods, like
<a href="struct.OsString.html#method.with_capacity"><code>OsString::with_capacity</code></a> to avoid reallocations.</p>
<h1 id="examples-16" class="section-header"><a href="#examples-16">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::<span class="ident">OsStr</span>;

<span class="kw">let</span> <span class="ident">os_str</span> <span class="op">=</span> <span class="ident">OsStr</span>::<span class="ident">new</span>(<span class="string">&quot;&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">os_str</span>.<span class="ident">len</span>(), <span class="number">0</span>);

<span class="kw">let</span> <span class="ident">os_str</span> <span class="op">=</span> <span class="ident">OsStr</span>::<span class="ident">new</span>(<span class="string">&quot;foo&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">os_str</span>.<span class="ident">len</span>(), <span class="number">3</span>);<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Affi%3A%3AOsStr%3B%0A%0Alet%20os_str%20%3D%20OsStr%3A%3Anew(%22%22)%3B%0Aassert_eq!(os_str.len()%2C%200)%3B%0A%0Alet%20os_str%20%3D%20OsStr%3A%3Anew(%22foo%22)%3B%0Aassert_eq!(os_str.len()%2C%203)%3B%0A%7D">Run</a></pre></div>
</div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-OsStringExt' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/os/unix/ffi/trait.OsStringExt.html" title="trait std::os::unix::ffi::OsStringExt">OsStringExt</a> for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-OsStringExt' class='anchor'></a><a class='srclink' href='../../src/std/sys_common/os_str_bytes.rs.html#206-213' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from_vec' class="method hidden"><code id='from_vec.v'>fn <a href='../../std/os/unix/ffi/trait.OsStringExt.html#tymethod.from_vec' class='fnname'>from_vec</a>(vec: <a class="struct" href="../../std/vec/struct.Vec.html" title="struct std::vec::Vec">Vec</a>&lt;<a class="primitive" href="../primitive.u8.html">u8</a>&gt;) -&gt; <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a class='srclink' href='../../src/std/sys_common/os_str_bytes.rs.html#207-209' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab portability'>This is supported on <strong>Unix</strong> only.</div></div><div class='docblock hidden'><p>Creates an [<code>OsString</code>] from a byte vector. <a href="../../std/os/unix/ffi/trait.OsStringExt.html#tymethod.from_vec">Read more</a></p>
</div><h4 id='method.into_vec' class="method hidden"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../std/vec/struct.Vec.html" title="struct std::vec::Vec">Vec</a>&lt;<a class="primitive" href="../primitive.u8.html">u8</a>&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../std/vec/struct.Vec.html" title="struct std::vec::Vec">Vec</a>&lt;<a class="primitive" href="../primitive.u8.html">u8</a>&gt;</h3><code class="content"><span class="where fmt-newline">impl <a class="trait" href="../../std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="../../std/vec/struct.Vec.html" title="struct std::vec::Vec">Vec</a>&lt;<a class="primitive" href="../primitive.u8.html">u8</a>&gt;</span></code></div></div><code id='into_vec.v'>fn <a href='../../std/os/unix/ffi/trait.OsStringExt.html#tymethod.into_vec' class='fnname'>into_vec</a>(self) -&gt; <a class="struct" href="../../std/vec/struct.Vec.html" title="struct std::vec::Vec">Vec</a>&lt;<a class="primitive" href="../primitive.u8.html">u8</a>&gt;</code><a class='srclink' href='../../src/std/sys_common/os_str_bytes.rs.html#210-212' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab portability'>This is supported on <strong>Unix</strong> only.</div></div><div class='docblock hidden'><p>Yields the underlying byte vector of this [<code>OsString</code>]. <a href="../../std/os/unix/ffi/trait.OsStringExt.html#tymethod.into_vec">Read more</a></p>
</div></div><h3 id='impl-OsStringExt-1' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/os/windows/ffi/trait.OsStringExt.html" title="trait std::os::windows::ffi::OsStringExt">OsStringExt</a> for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-OsStringExt-1' class='anchor'></a><a class='srclink' href='../../src/std/sys/windows/ext/ffi.rs.html#99-103' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from_wide' class="method hidden"><code id='from_wide.v'>fn <a href='../../std/os/windows/ffi/trait.OsStringExt.html#tymethod.from_wide' class='fnname'>from_wide</a>(wide: <a class="primitive" href="../primitive.slice.html">&amp;[</a><a class="primitive" href="../primitive.u16.html">u16</a><a class="primitive" href="../primitive.slice.html">]</a>) -&gt; <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a class='srclink' href='../../src/std/sys/windows/ext/ffi.rs.html#100-102' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab portability'>This is supported on <strong>Windows</strong> only.</div></div><div class='docblock hidden'><p>Creates an <code>OsString</code> from a potentially ill-formed UTF-16 slice of 16-bit code units. <a href="../../std/os/windows/ffi/trait.OsStringExt.html#tymethod.from_wide">Read more</a></p>
</div></div><h3 id='impl-Deref' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/ops/trait.Deref.html" title="trait std::ops::Deref">Deref</a> for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-Deref' class='anchor'></a><a class='srclink' href='../../src/std/ffi/os_str.rs.html#377-384' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Target' class="type"><code id='Target.t'>type <a href='../../std/ops/trait.Deref.html#associatedtype.Target' class="type">Target</a> = <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a></code></h4><div class='docblock'><p>The resulting type after dereferencing.</p>
</div><h4 id='method.deref' class="method hidden"><code id='deref.v'>fn <a href='../../std/ops/trait.Deref.html#tymethod.deref' class='fnname'>deref</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#381-383' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Dereferences the value.</p>
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/fmt/trait.Debug.html" title="trait std::fmt::Debug">Debug</a> for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../../src/std/ffi/os_str.rs.html#396-400' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='../../std/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, formatter: &amp;mut <a class="struct" href="../../std/fmt/struct.Formatter.html" title="struct std::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="../../std/fmt/type.Result.html" title="type std::fmt::Result">Result</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#397-399' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="../../std/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-PartialEq%3COsString%3E' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialEq%3COsString%3E' class='anchor'></a><a class='srclink' href='../../src/std/ffi/os_str.rs.html#403-407' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code id='eq.v'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#404-406' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class="method"><code id='ne.v'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3Cstr%3E' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;<a class="primitive" href="../primitive.str.html">str</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialEq%3Cstr%3E' class='anchor'></a><a class='srclink' href='../../src/std/ffi/os_str.rs.html#410-414' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-1' class="method hidden"><code id='eq.v-1'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="primitive" href="../primitive.str.html">str</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#411-413' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-1' class="method"><code id='ne.v-1'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3COsString%3E-1' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="primitive" href="../primitive.str.html">str</a></code><a href='#impl-PartialEq%3COsString%3E-1' class='anchor'></a><a class='srclink' href='../../src/std/ffi/os_str.rs.html#417-421' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-2' class="method hidden"><code id='eq.v-2'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#418-420' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-2' class="method"><code id='ne.v-2'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3C%26%27_%20str%3E' class='impl'><code class='in-band'>impl&lt;'_&gt; <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;&amp;'_ <a class="primitive" href="../primitive.str.html">str</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialEq%3C%26%27_%20str%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.29.0'>1.29.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#424-428' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-3' class="method hidden"><code id='eq.v-3'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;&amp;<a class="primitive" href="../primitive.str.html">str</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#425-427' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-3' class="method"><code id='ne.v-3'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3COsString%3E-2' class='impl'><code class='in-band'>impl&lt;'a&gt; <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for &amp;'a <a class="primitive" href="../primitive.str.html">str</a></code><a href='#impl-PartialEq%3COsString%3E-2' class='anchor'></a><div class='since' title='Stable since Rust version 1.29.0'>1.29.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#431-435' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-4' class="method hidden"><code id='eq.v-4'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#432-434' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-4' class="method"><code id='ne.v-4'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3COsStr%3E' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialEq%3COsStr%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#849-852' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-5' class="method hidden"><code id='eq.v-5'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#851' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-5' class="method"><code id='ne.v-5'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3COsString%3E-3' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a></code><a href='#impl-PartialEq%3COsString%3E-3' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#855-858' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-6' class="method hidden"><code id='eq.v-6'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#857' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-6' class="method"><code id='ne.v-6'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3C%26%27a%20OsStr%3E' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;&amp;'a <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialEq%3C%26%27a%20OsStr%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#849-852' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-7' class="method hidden"><code id='eq.v-7'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;&amp;'a <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#851' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-7' class="method"><code id='ne.v-7'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3COsString%3E-4' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for &amp;'a <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a></code><a href='#impl-PartialEq%3COsString%3E-4' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#855-858' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-8' class="method hidden"><code id='eq.v-8'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#857' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-8' class="method"><code id='ne.v-8'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3COsString%3E-5' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;</code><a href='#impl-PartialEq%3COsString%3E-5' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#849-852' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-9' class="method hidden"><code id='eq.v-9'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#851' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-9' class="method"><code id='ne.v-9'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3CCow%3C%27a%2C%20OsStr%3E%3E' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;<a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialEq%3CCow%3C%27a%2C%20OsStr%3E%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#855-858' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-10' class="method hidden"><code id='eq.v-10'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#857' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-10' class="method"><code id='ne.v-10'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3COsString%3E-6' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-PartialEq%3COsString%3E-6' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2760-2763' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-11' class="method hidden"><code id='eq.v-11'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/path.rs.html#2762' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-11' class="method"><code id='ne.v-11'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3CPathBuf%3E' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialEq%3CPathBuf%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2766-2769' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-12' class="method hidden"><code id='eq.v-12'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/path.rs.html#2768' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-12' class="method"><code id='ne.v-12'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3COsString%3E-7' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a></code><a href='#impl-PartialEq%3COsString%3E-7' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2760-2763' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-13' class="method hidden"><code id='eq.v-13'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/path.rs.html#2762' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-13' class="method"><code id='ne.v-13'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3CPath%3E' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialEq%3CPath%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2766-2769' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-14' class="method hidden"><code id='eq.v-14'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/path.rs.html#2768' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-14' class="method"><code id='ne.v-14'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3COsString%3E-8' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for &amp;'a <a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a></code><a href='#impl-PartialEq%3COsString%3E-8' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2760-2763' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-15' class="method hidden"><code id='eq.v-15'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/path.rs.html#2762' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-15' class="method"><code id='ne.v-15'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3C%26%27a%20Path%3E' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;&amp;'a <a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialEq%3C%26%27a%20Path%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2766-2769' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-16' class="method hidden"><code id='eq.v-16'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;&amp;'a <a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/path.rs.html#2768' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-16' class="method"><code id='ne.v-16'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3COsString%3E-9' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;</code><a href='#impl-PartialEq%3COsString%3E-9' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2760-2763' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-17' class="method hidden"><code id='eq.v-17'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/path.rs.html#2762' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-17' class="method"><code id='ne.v-17'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3CCow%3C%27a%2C%20Path%3E%3E' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a>&lt;<a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialEq%3CCow%3C%27a%2C%20Path%3E%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2766-2769' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq-18' class="method hidden"><code id='eq.v-18'>fn <a href='../../std/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/path.rs.html#2768' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="../../std/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne-18' class="method"><code id='ne.v-18'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#200' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-Eq' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/cmp/trait.Eq.html" title="trait std::cmp::Eq">Eq</a> for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-Eq' class='anchor'></a><a class='srclink' href='../../src/std/ffi/os_str.rs.html#438' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-Ord' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/cmp/trait.Ord.html" title="trait std::cmp::Ord">Ord</a> for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-Ord' class='anchor'></a><a class='srclink' href='../../src/std/ffi/os_str.rs.html#465-470' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.cmp' class="method hidden"><code id='cmp.v'>fn <a href='../../std/cmp/trait.Ord.html#tymethod.cmp' class='fnname'>cmp</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="enum" href="../../std/cmp/enum.Ordering.html" title="enum std::cmp::Ordering">Ordering</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#467-469' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an <code>Ordering</code> between <code>self</code> and <code>other</code>. <a href="../../std/cmp/trait.Ord.html#tymethod.cmp">Read more</a></p>
</div><h4 id='method.max' class="method"><code id='max.v'>fn <a href='../../std/cmp/trait.Ord.html#method.max' class='fnname'>max</a>(self, other: Self) -&gt; Self</code><div class='since' title='Stable since Rust version 1.21.0'>1.21.0</div><a class='srclink' href='../../src/core/cmp.rs.html#549-552' title='goto source code'>[src]</a></h4><div class='docblock'><p>Compares and returns the maximum of two values. <a href="../../std/cmp/trait.Ord.html#method.max">Read more</a></p>
</div><h4 id='method.min' class="method"><code id='min.v'>fn <a href='../../std/cmp/trait.Ord.html#method.min' class='fnname'>min</a>(self, other: Self) -&gt; Self</code><div class='since' title='Stable since Rust version 1.21.0'>1.21.0</div><a class='srclink' href='../../src/core/cmp.rs.html#566-569' title='goto source code'>[src]</a></h4><div class='docblock'><p>Compares and returns the minimum of two values. <a href="../../std/cmp/trait.Ord.html#method.min">Read more</a></p>
</div><h4 id='method.clamp' class="method"><code id='clamp.v'>fn <a href='../../std/cmp/trait.Ord.html#method.clamp' class='fnname'>clamp</a>(self, min: Self, max: Self) -&gt; Self</code><a class='srclink' href='../../src/core/cmp.rs.html#590-600' title='goto source code'>[src]</a></h4><div class='stability'><div class='stab unstable'><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>clamp</code>&nbsp;<a href="https://github.com/rust-lang/rust/issues/44095">#44095</a>)</div></div><div class='docblock'><p>Restrict a value to a certain interval. <a href="../../std/cmp/trait.Ord.html#method.clamp">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3COsString%3E' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/cmp/trait.PartialOrd.html" title="trait std::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialOrd%3COsString%3E' class='anchor'></a><a class='srclink' href='../../src/std/ffi/os_str.rs.html#441-454' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp' class="method hidden"><code id='partial_cmp.v'>fn <a href='../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;<a class="enum" href="../../std/cmp/enum.Ordering.html" title="enum std::cmp::Ordering">Ordering</a>&gt;</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#443-445' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt' class="method hidden"><code id='lt.v'>fn <a href='../../std/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#447' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le' class="method hidden"><code id='le.v'>fn <a href='../../std/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#449' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt' class="method hidden"><code id='gt.v'>fn <a href='../../std/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#451' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge' class="method hidden"><code id='ge.v'>fn <a href='../../std/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#453' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3Cstr%3E' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/cmp/trait.PartialOrd.html" title="trait std::cmp::PartialOrd">PartialOrd</a>&lt;<a class="primitive" href="../primitive.str.html">str</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialOrd%3Cstr%3E' class='anchor'></a><a class='srclink' href='../../src/std/ffi/os_str.rs.html#457-462' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp-1' class="method hidden"><code id='partial_cmp.v-1'>fn <a href='../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;<a class="primitive" href="../primitive.str.html">str</a>) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;<a class="enum" href="../../std/cmp/enum.Ordering.html" title="enum std::cmp::Ordering">Ordering</a>&gt;</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#459-461' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt-1' class="method"><code id='lt.v-1'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#772-777' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le-1' class="method"><code id='le.v-1'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#794-799' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt-1' class="method"><code id='gt.v-1'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#815-820' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge-1' class="method"><code id='ge.v-1'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#837-842' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3COsStr%3E' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialOrd.html" title="trait std::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialOrd%3COsStr%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#861-866' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp-2' class="method hidden"><code id='partial_cmp.v-2'>fn <a href='../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;<a class="enum" href="../../std/cmp/enum.Ordering.html" title="enum std::cmp::Ordering">Ordering</a>&gt;</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#863-865' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt-2' class="method"><code id='lt.v-2'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#772-777' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le-2' class="method"><code id='le.v-2'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#794-799' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt-2' class="method"><code id='gt.v-2'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#815-820' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge-2' class="method"><code id='ge.v-2'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#837-842' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3COsString%3E-1' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialOrd.html" title="trait std::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a></code><a href='#impl-PartialOrd%3COsString%3E-1' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#869-874' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp-3' class="method hidden"><code id='partial_cmp.v-3'>fn <a href='../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;<a class="enum" href="../../std/cmp/enum.Ordering.html" title="enum std::cmp::Ordering">Ordering</a>&gt;</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#871-873' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt-3' class="method"><code id='lt.v-3'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#772-777' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le-3' class="method"><code id='le.v-3'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#794-799' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt-3' class="method"><code id='gt.v-3'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#815-820' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge-3' class="method"><code id='ge.v-3'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#837-842' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3C%26%27a%20OsStr%3E' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialOrd.html" title="trait std::cmp::PartialOrd">PartialOrd</a>&lt;&amp;'a <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialOrd%3C%26%27a%20OsStr%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#861-866' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp-4' class="method hidden"><code id='partial_cmp.v-4'>fn <a href='../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;&amp;'a <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;<a class="enum" href="../../std/cmp/enum.Ordering.html" title="enum std::cmp::Ordering">Ordering</a>&gt;</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#863-865' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt-4' class="method"><code id='lt.v-4'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#772-777' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le-4' class="method"><code id='le.v-4'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#794-799' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt-4' class="method"><code id='gt.v-4'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#815-820' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge-4' class="method"><code id='ge.v-4'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#837-842' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3COsString%3E-2' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialOrd.html" title="trait std::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for &amp;'a <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a></code><a href='#impl-PartialOrd%3COsString%3E-2' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#869-874' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp-5' class="method hidden"><code id='partial_cmp.v-5'>fn <a href='../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;<a class="enum" href="../../std/cmp/enum.Ordering.html" title="enum std::cmp::Ordering">Ordering</a>&gt;</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#871-873' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt-5' class="method"><code id='lt.v-5'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#772-777' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le-5' class="method"><code id='le.v-5'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#794-799' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt-5' class="method"><code id='gt.v-5'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#815-820' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge-5' class="method"><code id='ge.v-5'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#837-842' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3COsString%3E-3' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialOrd.html" title="trait std::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;</code><a href='#impl-PartialOrd%3COsString%3E-3' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#861-866' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp-6' class="method hidden"><code id='partial_cmp.v-6'>fn <a href='../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;<a class="enum" href="../../std/cmp/enum.Ordering.html" title="enum std::cmp::Ordering">Ordering</a>&gt;</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#863-865' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt-6' class="method"><code id='lt.v-6'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#772-777' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le-6' class="method"><code id='le.v-6'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#794-799' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt-6' class="method"><code id='gt.v-6'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#815-820' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge-6' class="method"><code id='ge.v-6'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#837-842' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3CCow%3C%27a%2C%20OsStr%3E%3E' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialOrd.html" title="trait std::cmp::PartialOrd">PartialOrd</a>&lt;<a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialOrd%3CCow%3C%27a%2C%20OsStr%3E%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#869-874' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp-7' class="method hidden"><code id='partial_cmp.v-7'>fn <a href='../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;<a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;<a class="enum" href="../../std/cmp/enum.Ordering.html" title="enum std::cmp::Ordering">Ordering</a>&gt;</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#871-873' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt-7' class="method"><code id='lt.v-7'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#772-777' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le-7' class="method"><code id='le.v-7'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#794-799' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt-7' class="method"><code id='gt.v-7'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#815-820' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge-7' class="method"><code id='ge.v-7'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#837-842' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3COsString%3E-4' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialOrd.html" title="trait std::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-PartialOrd%3COsString%3E-4' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2772-2777' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp-8' class="method hidden"><code id='partial_cmp.v-8'>fn <a href='../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;<a class="enum" href="../../std/cmp/enum.Ordering.html" title="enum std::cmp::Ordering">Ordering</a>&gt;</code><a class='srclink' href='../../src/std/path.rs.html#2774-2776' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt-8' class="method"><code id='lt.v-8'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#772-777' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le-8' class="method"><code id='le.v-8'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#794-799' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt-8' class="method"><code id='gt.v-8'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#815-820' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge-8' class="method"><code id='ge.v-8'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#837-842' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3CPathBuf%3E' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialOrd.html" title="trait std::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialOrd%3CPathBuf%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2780-2785' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp-9' class="method hidden"><code id='partial_cmp.v-9'>fn <a href='../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;<a class="enum" href="../../std/cmp/enum.Ordering.html" title="enum std::cmp::Ordering">Ordering</a>&gt;</code><a class='srclink' href='../../src/std/path.rs.html#2782-2784' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt-9' class="method"><code id='lt.v-9'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#772-777' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le-9' class="method"><code id='le.v-9'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#794-799' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt-9' class="method"><code id='gt.v-9'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#815-820' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge-9' class="method"><code id='ge.v-9'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#837-842' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3COsString%3E-5' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialOrd.html" title="trait std::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a></code><a href='#impl-PartialOrd%3COsString%3E-5' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2772-2777' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp-10' class="method hidden"><code id='partial_cmp.v-10'>fn <a href='../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;<a class="enum" href="../../std/cmp/enum.Ordering.html" title="enum std::cmp::Ordering">Ordering</a>&gt;</code><a class='srclink' href='../../src/std/path.rs.html#2774-2776' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt-10' class="method"><code id='lt.v-10'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#772-777' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le-10' class="method"><code id='le.v-10'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#794-799' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt-10' class="method"><code id='gt.v-10'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#815-820' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge-10' class="method"><code id='ge.v-10'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#837-842' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3CPath%3E' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialOrd.html" title="trait std::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialOrd%3CPath%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2780-2785' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp-11' class="method hidden"><code id='partial_cmp.v-11'>fn <a href='../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;<a class="enum" href="../../std/cmp/enum.Ordering.html" title="enum std::cmp::Ordering">Ordering</a>&gt;</code><a class='srclink' href='../../src/std/path.rs.html#2782-2784' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt-11' class="method"><code id='lt.v-11'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#772-777' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le-11' class="method"><code id='le.v-11'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#794-799' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt-11' class="method"><code id='gt.v-11'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#815-820' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge-11' class="method"><code id='ge.v-11'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#837-842' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3COsString%3E-6' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialOrd.html" title="trait std::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for &amp;'a <a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a></code><a href='#impl-PartialOrd%3COsString%3E-6' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2772-2777' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp-12' class="method hidden"><code id='partial_cmp.v-12'>fn <a href='../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;<a class="enum" href="../../std/cmp/enum.Ordering.html" title="enum std::cmp::Ordering">Ordering</a>&gt;</code><a class='srclink' href='../../src/std/path.rs.html#2774-2776' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt-12' class="method"><code id='lt.v-12'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#772-777' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le-12' class="method"><code id='le.v-12'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#794-799' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt-12' class="method"><code id='gt.v-12'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#815-820' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge-12' class="method"><code id='ge.v-12'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#837-842' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3C%26%27a%20Path%3E' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialOrd.html" title="trait std::cmp::PartialOrd">PartialOrd</a>&lt;&amp;'a <a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialOrd%3C%26%27a%20Path%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2780-2785' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp-13' class="method hidden"><code id='partial_cmp.v-13'>fn <a href='../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;&amp;'a <a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;<a class="enum" href="../../std/cmp/enum.Ordering.html" title="enum std::cmp::Ordering">Ordering</a>&gt;</code><a class='srclink' href='../../src/std/path.rs.html#2782-2784' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt-13' class="method"><code id='lt.v-13'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#772-777' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le-13' class="method"><code id='le.v-13'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#794-799' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt-13' class="method"><code id='gt.v-13'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#815-820' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge-13' class="method"><code id='ge.v-13'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#837-842' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3COsString%3E-7' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialOrd.html" title="trait std::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;</code><a href='#impl-PartialOrd%3COsString%3E-7' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2772-2777' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp-14' class="method hidden"><code id='partial_cmp.v-14'>fn <a href='../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;<a class="enum" href="../../std/cmp/enum.Ordering.html" title="enum std::cmp::Ordering">Ordering</a>&gt;</code><a class='srclink' href='../../src/std/path.rs.html#2774-2776' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt-14' class="method"><code id='lt.v-14'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#772-777' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le-14' class="method"><code id='le.v-14'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#794-799' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt-14' class="method"><code id='gt.v-14'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#815-820' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge-14' class="method"><code id='ge.v-14'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#837-842' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-PartialOrd%3CCow%3C%27a%2C%20Path%3E%3E' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; <a class="trait" href="../../std/cmp/trait.PartialOrd.html" title="trait std::cmp::PartialOrd">PartialOrd</a>&lt;<a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-PartialOrd%3CCow%3C%27a%2C%20Path%3E%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2780-2785' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.partial_cmp-15' class="method hidden"><code id='partial_cmp.v-15'>fn <a href='../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, other: &amp;<a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;<a class="enum" href="../../std/cmp/enum.Ordering.html" title="enum std::cmp::Ordering">Ordering</a>&gt;</code><a class='srclink' href='../../src/std/path.rs.html#2782-2784' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="../../std/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt-15' class="method"><code id='lt.v-15'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#772-777' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le-15' class="method"><code id='le.v-15'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#794-799' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt-15' class="method"><code id='gt.v-15'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#815-820' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge-15' class="method"><code id='ge.v-15'><div class="docblock attributes">#[must_use]
</div>fn <a href='../../std/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code><a class='srclink' href='../../src/core/cmp.rs.html#837-842' title='goto source code'>[src]</a></h4><div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="../../std/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-From%3CString%3E' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/convert/trait.From.html" title="trait std::convert::From">From</a>&lt;<a class="struct" href="../../std/string/struct.String.html" title="struct std::string::String">String</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-From%3CString%3E' class='anchor'></a><a class='srclink' href='../../src/std/ffi/os_str.rs.html#350-357' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method"><code id='from.v'>fn <a href='../../std/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(s: <a class="struct" href="../../std/string/struct.String.html" title="struct std::string::String">String</a>) -&gt; <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#354-356' title='goto source code'>[src]</a></h4><div class='docblock'><p>Converts a <a href="../../std/string/struct.String.html" title="`String`"><code>String</code></a> into a <a href="../../std/ffi/struct.OsString.html" title="`OsString`"><code>OsString</code></a>.</p>
<p>The conversion copies the data, and includes an allocation on the heap.</p>
</div></div><h3 id='impl-From%3C%26%27_%20T%3E' class='impl'><code class='in-band'>impl&lt;T:&nbsp;?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a> + <a class="trait" href="../../std/convert/trait.AsRef.html" title="trait std::convert::AsRef">AsRef</a>&lt;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;, '_&gt; <a class="trait" href="../../std/convert/trait.From.html" title="trait std::convert::From">From</a>&lt;<a class="primitive" href="../primitive.reference.html">&amp;'_ </a>T&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-From%3C%26%27_%20T%3E' class='anchor'></a><a class='srclink' href='../../src/std/ffi/os_str.rs.html#360-364' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-1' class="method hidden"><code id='from.v-1'>fn <a href='../../std/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(s: <a class="primitive" href="../primitive.reference.html">&amp;</a>T) -&gt; <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#361-363' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CBox%3COsStr%3E%3E' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/convert/trait.From.html" title="trait std::convert::From">From</a>&lt;<a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-From%3CBox%3COsStr%3E%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.18.0'>1.18.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#667-675' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-2' class="method"><code id='from.v-2'>fn <a href='../../std/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(boxed: <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;) -&gt; <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#672-674' title='goto source code'>[src]</a></h4><div class='docblock'><p>Converts a <code>Box&lt;OsStr&gt;</code> into a <code>OsString</code> without copying or allocating.</p>
</div></div><h3 id='impl-From%3COsString%3E' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/convert/trait.From.html" title="trait std::convert::From">From</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;</code><a href='#impl-From%3COsString%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.20.0'>1.20.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#678-686' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-3' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;I&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;I&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;I&gt; <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a> for <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;I&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">    type <a href='../../std/iter/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = &lt;I as <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a>&gt;::<a class="type" href="../../std/iter/trait.Iterator.html#associatedtype.Item" title="type std::iter::Iterator::Item">Item</a>;</span><span class="where fmt-newline">impl&lt;F&gt; <a class="trait" href="../../std/future/trait.Future.html" title="trait std::future::Future">Future</a> for <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="../../std/marker/trait.Unpin.html" title="trait std::marker::Unpin">Unpin</a> + <a class="trait" href="../../std/future/trait.Future.html" title="trait std::future::Future">Future</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">    type <a href='../../std/future/trait.Future.html#associatedtype.Output' class="type">Output</a> = &lt;F as <a class="trait" href="../../std/future/trait.Future.html" title="trait std::future::Future">Future</a>&gt;::<a class="type" href="../../std/future/trait.Future.html#associatedtype.Output" title="type std::future::Future::Output">Output</a>;</span><span class="where fmt-newline">impl&lt;R:&nbsp;<a class="trait" href="../../std/io/trait.Read.html" title="trait std::io::Read">Read</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>&gt; <a class="trait" href="../../std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;R&gt;</span><span class="where fmt-newline">impl&lt;W:&nbsp;<a class="trait" href="../../std/io/trait.Write.html" title="trait std::io::Write">Write</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>&gt; <a class="trait" href="../../std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;W&gt;</span></code></div></div><code id='from.v-3'>fn <a href='../../std/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(s: <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#683-685' title='goto source code'>[src]</a></h4><div class='docblock'><p>Converts a <a href="../ffi/struct.OsString.html"><code>OsString</code></a> into a <a href="../boxed/struct.Box.html"><code>Box</code></a><code>&lt;OsStr&gt;</code> without copying or allocating.</p>
</div></div><h3 id='impl-From%3COsString%3E-1' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/convert/trait.From.html" title="trait std::convert::From">From</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="struct" href="../../std/sync/struct.Arc.html" title="struct std::sync::Arc">Arc</a>&lt;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;</code><a href='#impl-From%3COsString%3E-1' class='anchor'></a><div class='since' title='Stable since Rust version 1.24.0'>1.24.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#697-707' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-4' class="method"><code id='from.v-4'>fn <a href='../../std/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(s: <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="struct" href="../../std/sync/struct.Arc.html" title="struct std::sync::Arc">Arc</a>&lt;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#703-706' title='goto source code'>[src]</a></h4><div class='docblock'><p>Converts a <a href="../ffi/struct.OsString.html"><code>OsString</code></a> into a <a href="../sync/struct.Arc.html"><code>Arc</code></a><code>&lt;OsStr&gt;</code> without copying or allocating.</p>
</div></div><h3 id='impl-From%3COsString%3E-2' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/convert/trait.From.html" title="trait std::convert::From">From</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="struct" href="../../std/rc/struct.Rc.html" title="struct std::rc::Rc">Rc</a>&lt;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;</code><a href='#impl-From%3COsString%3E-2' class='anchor'></a><div class='since' title='Stable since Rust version 1.24.0'>1.24.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#719-729' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-5' class="method"><code id='from.v-5'>fn <a href='../../std/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(s: <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="struct" href="../../std/rc/struct.Rc.html" title="struct std::rc::Rc">Rc</a>&lt;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#725-728' title='goto source code'>[src]</a></h4><div class='docblock'><p>Converts a <a href="../ffi/struct.OsString.html"><code>OsString</code></a> into a <a href="../rc/struct.Rc.html"><code>Rc</code></a><code>&lt;OsStr&gt;</code> without copying or allocating.</p>
</div></div><h3 id='impl-From%3COsString%3E-3' class='impl'><code class='in-band'>impl&lt;'a&gt; <a class="trait" href="../../std/convert/trait.From.html" title="trait std::convert::From">From</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;</code><a href='#impl-From%3COsString%3E-3' class='anchor'></a><div class='since' title='Stable since Rust version 1.28.0'>1.28.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#741-746' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-6' class="method hidden"><code id='from.v-6'>fn <a href='../../std/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(s: <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#743-745' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3C%26%27a%20OsString%3E' class='impl'><code class='in-band'>impl&lt;'a&gt; <a class="trait" href="../../std/convert/trait.From.html" title="trait std::convert::From">From</a>&lt;&amp;'a <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;</code><a href='#impl-From%3C%26%27a%20OsString%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.28.0'>1.28.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#757-762' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-7' class="method hidden"><code id='from.v-7'>fn <a href='../../std/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(s: &amp;'a <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#759-761' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CCow%3C%27a%2C%20OsStr%3E%3E' class='impl'><code class='in-band'>impl&lt;'a&gt; <a class="trait" href="../../std/convert/trait.From.html" title="trait std::convert::From">From</a>&lt;<a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-From%3CCow%3C%27a%2C%20OsStr%3E%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.28.0'>1.28.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#765-770' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-8' class="method hidden"><code id='from.v-8'>fn <a href='../../std/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(s: <a class="enum" href="../../std/borrow/enum.Cow.html" title="enum std::borrow::Cow">Cow</a>&lt;'a, <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;) -&gt; Self</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#767-769' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3COsString%3E-4' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/convert/trait.From.html" title="trait std::convert::From">From</a>&lt;<a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>&gt; for <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-From%3COsString%3E-4' class='anchor'></a><a class='srclink' href='../../src/std/path.rs.html#1504-1511' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-9' class="method"><code id='from.v-9'>fn <a href='../../std/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(s: <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a>) -&gt; <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a class='srclink' href='../../src/std/path.rs.html#1508-1510' title='goto source code'>[src]</a></h4><div class='docblock'><p>Converts a <code>OsString</code> into a <code>PathBuf</code></p>
<p>This conversion does not allocate or copy memory.</p>
</div></div><h3 id='impl-From%3CPathBuf%3E' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/convert/trait.From.html" title="trait std::convert::From">From</a>&lt;<a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-From%3CPathBuf%3E' class='anchor'></a><div class='since' title='Stable since Rust version 1.14.0'>1.14.0</div><a class='srclink' href='../../src/std/path.rs.html#1514-1521' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-10' class="method"><code id='from.v-10'>fn <a href='../../std/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(path_buf: <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>) -&gt; <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a class='srclink' href='../../src/std/path.rs.html#1518-1520' title='goto source code'>[src]</a></h4><div class='docblock'><p>Converts a <code>PathBuf</code> into a <code>OsString</code></p>
<p>This conversion does not allocate or copy memory.</p>
</div></div><h3 id='impl-Hash' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/hash/trait.Hash.html" title="trait std::hash::Hash">Hash</a> for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-Hash' class='anchor'></a><a class='srclink' href='../../src/std/ffi/os_str.rs.html#473-478' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.hash' class="method hidden"><code id='hash.v'>fn <a href='../../std/hash/trait.Hash.html#tymethod.hash' class='fnname'>hash</a>&lt;H:&nbsp;<a class="trait" href="../../std/hash/trait.Hasher.html" title="trait std::hash::Hasher">Hasher</a>&gt;(&amp;self, state: <a class="primitive" href="../primitive.reference.html">&amp;mut </a>H)</code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#475-477' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Feeds this value into the given [<code>Hasher</code>]. <a href="../../std/hash/trait.Hash.html#tymethod.hash">Read more</a></p>
</div><h4 id='method.hash_slice' class="method"><code id='hash_slice.v'>fn <a href='../../std/hash/trait.Hash.html#method.hash_slice' class='fnname'>hash_slice</a>&lt;H&gt;(data: <a class="primitive" href="../primitive.slice.html">&amp;[Self]</a>, state: <a class="primitive" href="../primitive.reference.html">&amp;mut </a>H) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;H: <a class="trait" href="../../std/hash/trait.Hasher.html" title="trait std::hash::Hasher">Hasher</a>,&nbsp;</span></code><div class='since' title='Stable since Rust version 1.3.0'>1.3.0</div><a class='srclink' href='../../src/core/hash/mod.rs.html#193-199' title='goto source code'>[src]</a></h4><div class='docblock'><p>Feeds a slice of this type into the given [<code>Hasher</code>]. <a href="../../std/hash/trait.Hash.html#method.hash_slice">Read more</a></p>
</div></div><h3 id='impl-Index%3CRangeFull%3E' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/ops/trait.Index.html" title="trait std::ops::Index">Index</a>&lt;<a class="struct" href="../../std/ops/struct.RangeFull.html" title="struct std::ops::RangeFull">RangeFull</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-Index%3CRangeFull%3E' class='anchor'></a><a class='srclink' href='../../src/std/ffi/os_str.rs.html#367-374' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Output' class="type"><code id='Output.t'>type <a href='../../std/ops/trait.Index.html#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a></code></h4><div class='docblock'><p>The returned type after indexing.</p>
</div><h4 id='method.index' class="method hidden"><code id='index.v'>fn <a href='../../std/ops/trait.Index.html#tymethod.index' class='fnname'>index</a>(&amp;self, _index: <a class="struct" href="../../std/ops/struct.RangeFull.html" title="struct std::ops::RangeFull">RangeFull</a>) -&gt; &amp;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#371-373' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the indexing (<code>container[index]</code>) operation.</p>
</div></div><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/clone/trait.Clone.html" title="trait std::clone::Clone">Clone</a> for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/std/ffi/os_str.rs.html#78' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code id='clone.v'>fn <a href='../../std/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#78' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="../../std/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method"><code id='clone_from.v'>fn <a href='../../std/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="../primitive.reference.html">&amp;</a>Self)</code><a class='srclink' href='../../src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="../../std/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-AsRef%3COsStr%3E' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/convert/trait.AsRef.html" title="trait std::convert::AsRef">AsRef</a>&lt;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-AsRef%3COsStr%3E' class='anchor'></a><a class='srclink' href='../../src/std/ffi/os_str.rs.html#930-934' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.as_ref' class="method hidden"><code id='as_ref.v'>fn <a href='../../std/convert/trait.AsRef.html#tymethod.as_ref' class='fnname'>as_ref</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#931-933' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-AsRef%3CPath%3E' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/convert/trait.AsRef.html" title="trait std::convert::AsRef">AsRef</a>&lt;<a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-AsRef%3CPath%3E' class='anchor'></a><a class='srclink' href='../../src/std/path.rs.html#2678-2682' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.as_ref-1' class="method hidden"><code id='as_ref.v-1'>fn <a href='../../std/convert/trait.AsRef.html#tymethod.as_ref' class='fnname'>as_ref</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a></code><a class='srclink' href='../../src/std/path.rs.html#2679-2681' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-Default' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/default/trait.Default.html" title="trait std::default::Default">Default</a> for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-Default' class='anchor'></a><div class='since' title='Stable since Rust version 1.9.0'>1.9.0</div><a class='srclink' href='../../src/std/ffi/os_str.rs.html#387-393' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.default' class="method"><code id='default.v'>fn <a href='../../std/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -&gt; <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#390-392' title='goto source code'>[src]</a></h4><div class='docblock'><p>Constructs an empty <code>OsString</code>.</p>
</div></div><h3 id='impl-Borrow%3COsStr%3E' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/borrow/trait.Borrow.html" title="trait std::borrow::Borrow">Borrow</a>&lt;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt; for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-Borrow%3COsStr%3E' class='anchor'></a><a class='srclink' href='../../src/std/ffi/os_str.rs.html#906-908' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='../../std/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a></code><a class='srclink' href='../../src/std/ffi/os_str.rs.html#907' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="../../std/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a> for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="../../std/marker/trait.Sync.html" title="trait std::marker::Sync">Sync</a> for <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-TryFrom' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="../../std/convert/trait.TryFrom.html" title="trait std::convert::TryFrom">TryFrom</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="../../std/convert/trait.Into.html" title="trait std::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryFrom' class='anchor'></a><a class='srclink' href='../../src/core/convert.rs.html#565-571' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='../../std/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="../../std/convert/enum.Infallible.html" title="enum std::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='../../std/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -&gt; <a class="enum" href="../../std/result/enum.Result.html" title="enum std::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="../../std/convert/trait.TryFrom.html" title="trait std::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="../../std/convert/trait.TryFrom.html#associatedtype.Error" title="type std::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='../../src/core/convert.rs.html#568-570' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="../../std/convert/trait.From.html" title="trait std::convert::From">From</a> for T</code><a href='#impl-From' class='anchor'></a><a class='srclink' href='../../src/core/convert.rs.html#546-548' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-11' class="method hidden"><code id='from.v-11'>fn <a href='../../std/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -&gt; T</code><a class='srclink' href='../../src/core/convert.rs.html#547' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryInto' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="../../std/convert/trait.TryInto.html" title="trait std::convert::TryInto">TryInto</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="../../std/convert/trait.TryFrom.html" title="trait std::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryInto' class='anchor'></a><a class='srclink' href='../../src/core/convert.rs.html#553-560' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='../../std/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = &lt;U as <a class="trait" href="../../std/convert/trait.TryFrom.html" title="trait std::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="../../std/convert/trait.TryFrom.html#associatedtype.Error" title="type std::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='../../std/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -&gt; <a class="enum" href="../../std/result/enum.Result.html" title="enum std::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="../../std/convert/trait.TryFrom.html" title="trait std::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="../../std/convert/trait.TryFrom.html#associatedtype.Error" title="type std::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='../../src/core/convert.rs.html#557-559' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-Into' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="../../std/convert/trait.Into.html" title="trait std::convert::Into">Into</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="../../std/convert/trait.From.html" title="trait std::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-Into' class='anchor'></a><a class='srclink' href='../../src/core/convert.rs.html#537-542' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='../../std/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -&gt; U</code><a class='srclink' href='../../src/core/convert.rs.html#539-541' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-Borrow' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="../../std/borrow/trait.Borrow.html" title="trait std::borrow::Borrow">Borrow</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow' class='anchor'></a><a class='srclink' href='../../src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow-1' class="method hidden"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="primitive" href="../primitive.reference.html">&amp;'_ mut </a>F</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="primitive" href="../primitive.reference.html">&amp;'_ mut </a>F</h3><code class="content"><span class="where fmt-newline">impl&lt;'_, F&gt; <a class="trait" href="../../std/future/trait.Future.html" title="trait std::future::Future">Future</a> for <a class="primitive" href="../primitive.reference.html">&amp;'_ mut </a>F <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="../../std/marker/trait.Unpin.html" title="trait std::marker::Unpin">Unpin</a> + <a class="trait" href="../../std/future/trait.Future.html" title="trait std::future::Future">Future</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">    type <a href='../../std/future/trait.Future.html#associatedtype.Output' class="type">Output</a> = &lt;F as <a class="trait" href="../../std/future/trait.Future.html" title="trait std::future::Future">Future</a>&gt;::<a class="type" href="../../std/future/trait.Future.html#associatedtype.Output" title="type std::future::Future::Output">Output</a>;</span><span class="where fmt-newline">impl&lt;'_, I&gt; <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a> for <a class="primitive" href="../primitive.reference.html">&amp;'_ mut </a>I <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">    type <a href='../../std/iter/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = &lt;I as <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a>&gt;::<a class="type" href="../../std/iter/trait.Iterator.html#associatedtype.Item" title="type std::iter::Iterator::Item">Item</a>;</span><span class="where fmt-newline">impl&lt;R:&nbsp;<a class="trait" href="../../std/io/trait.Read.html" title="trait std::io::Read">Read</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>, '_&gt; <a class="trait" href="../../std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="primitive" href="../primitive.reference.html">&amp;'_ mut </a>R</span><span class="where fmt-newline">impl&lt;W:&nbsp;<a class="trait" href="../../std/io/trait.Write.html" title="trait std::io::Write">Write</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>, '_&gt; <a class="trait" href="../../std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="primitive" href="../primitive.reference.html">&amp;'_ mut </a>W</span></code></div></div><code id='borrow.v-1'>fn <a href='../../std/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.reference.html">&amp;</a>T</code><a class='srclink' href='../../src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="../../std/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-BorrowMut' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="../../std/borrow/trait.BorrowMut.html" title="trait std::borrow::BorrowMut">BorrowMut</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-BorrowMut' class='anchor'></a><a class='srclink' href='../../src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="primitive" href="../primitive.reference.html">&amp;'_ mut </a>F</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="primitive" href="../primitive.reference.html">&amp;'_ mut </a>F</h3><code class="content"><span class="where fmt-newline">impl&lt;'_, F&gt; <a class="trait" href="../../std/future/trait.Future.html" title="trait std::future::Future">Future</a> for <a class="primitive" href="../primitive.reference.html">&amp;'_ mut </a>F <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="../../std/marker/trait.Unpin.html" title="trait std::marker::Unpin">Unpin</a> + <a class="trait" href="../../std/future/trait.Future.html" title="trait std::future::Future">Future</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">    type <a href='../../std/future/trait.Future.html#associatedtype.Output' class="type">Output</a> = &lt;F as <a class="trait" href="../../std/future/trait.Future.html" title="trait std::future::Future">Future</a>&gt;::<a class="type" href="../../std/future/trait.Future.html#associatedtype.Output" title="type std::future::Future::Output">Output</a>;</span><span class="where fmt-newline">impl&lt;'_, I&gt; <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a> for <a class="primitive" href="../primitive.reference.html">&amp;'_ mut </a>I <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">    type <a href='../../std/iter/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = &lt;I as <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a>&gt;::<a class="type" href="../../std/iter/trait.Iterator.html#associatedtype.Item" title="type std::iter::Iterator::Item">Item</a>;</span><span class="where fmt-newline">impl&lt;R:&nbsp;<a class="trait" href="../../std/io/trait.Read.html" title="trait std::io::Read">Read</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>, '_&gt; <a class="trait" href="../../std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="primitive" href="../primitive.reference.html">&amp;'_ mut </a>R</span><span class="where fmt-newline">impl&lt;W:&nbsp;<a class="trait" href="../../std/io/trait.Write.html" title="trait std::io::Write">Write</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>, '_&gt; <a class="trait" href="../../std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="primitive" href="../primitive.reference.html">&amp;'_ mut </a>W</span></code></div></div><code id='borrow_mut.v'>fn <a href='../../std/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="../primitive.reference.html">&amp;mut </a>T</code><a class='srclink' href='../../src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="../../std/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="../../std/any/trait.Any.html" title="trait std::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='../../src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='../../std/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="../../std/any/struct.TypeId.html" title="struct std::any::TypeId">TypeId</a></code><a class='srclink' href='../../src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="../../std/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-ToOwned' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="../../std/borrow/trait.ToOwned.html" title="trait std::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/clone/trait.Clone.html" title="trait std::clone::Clone">Clone</a>,&nbsp;</span></code><a href='#impl-ToOwned' class='anchor'></a><a class='srclink' href='../../src/alloc/borrow.rs.html#80-91' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Owned' class="type"><code id='Owned.t'>type <a href='../../std/borrow/trait.ToOwned.html#associatedtype.Owned' class="type">Owned</a> = T</code></h4><h4 id='method.to_owned' class="method hidden"><code id='to_owned.v'>fn <a href='../../std/borrow/trait.ToOwned.html#tymethod.to_owned' class='fnname'>to_owned</a>(&amp;self) -&gt; T</code><a class='srclink' href='../../src/alloc/borrow.rs.html#84-86' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="../../std/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
</div><h4 id='method.clone_into' class="method hidden"><code id='clone_into.v'>fn <a href='../../std/borrow/trait.ToOwned.html#method.clone_into' class='fnname'>clone_into</a>(&amp;self, target: <a class="primitive" href="../primitive.reference.html">&amp;mut </a>T)</code><a class='srclink' href='../../src/alloc/borrow.rs.html#88-90' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><details><summary><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>&nbsp;<a href="https://github.com/rust-lang/rust/issues/41263">#41263</a>)</summary><p>recently added</p>
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="../../std/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "std";</script><script src="../../aliases.js"></script><script src="../../main1.35.0.js"></script><script defer src="../../search-index.js"></script></body></html>