Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > fdedb3cf2140df9b6d419a2338ab1caa > files > 5444

rust-doc-1.25.0-1.mga6.x86_64.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 `PathBuf` struct in crate `std`.">
    <meta name="keywords" content="rust, rustlang, rust-lang, PathBuf">

    <title>std::path::PathBuf - Rust</title>

    <link rel="stylesheet" type="text/css" href="../../normalize.css">
    <link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle">
    
    <link rel="stylesheet" type="text/css" href="../../dark.css">
    <link rel="stylesheet" type="text/css" href="../../main.css" id="themeStyle">
    <script src="../../storage.js"></script>
    

    <link rel="shortcut icon" href="https://doc.rust-lang.org/favicon.ico">
    
</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='https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png' alt='logo' width='100'></a>
        <p class='location'>Struct PathBuf</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.as_path">as_path</a><a href="#method.push">push</a><a href="#method.pop">pop</a><a href="#method.set_file_name">set_file_name</a><a href="#method.set_extension">set_extension</a><a href="#method.into_os_string">into_os_string</a><a href="#method.into_boxed_path">into_boxed_path</a></div><a class="sidebar-title" href="#deref-methods">Methods from Deref&lt;Target=Path&gt;</a><div class="sidebar-links"><a href="#method.as_os_str">as_os_str</a><a href="#method.to_str">to_str</a><a href="#method.to_string_lossy">to_string_lossy</a><a href="#method.to_path_buf">to_path_buf</a><a href="#method.is_absolute">is_absolute</a><a href="#method.is_relative">is_relative</a><a href="#method.has_root">has_root</a><a href="#method.parent">parent</a><a href="#method.file_name">file_name</a><a href="#method.strip_prefix">strip_prefix</a><a href="#method.starts_with">starts_with</a><a href="#method.ends_with">ends_with</a><a href="#method.file_stem">file_stem</a><a href="#method.extension">extension</a><a href="#method.join">join</a><a href="#method.with_file_name">with_file_name</a><a href="#method.with_extension">with_extension</a><a href="#method.components">components</a><a href="#method.iter">iter</a><a href="#method.display">display</a><a href="#method.metadata">metadata</a><a href="#method.symlink_metadata">symlink_metadata</a><a href="#method.canonicalize">canonicalize</a><a href="#method.read_link">read_link</a><a href="#method.read_dir">read_dir</a><a href="#method.exists">exists</a><a href="#method.is_file">is_file</a><a href="#method.is_dir">is_dir</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-From%3CBox%3CPath%3E%3E">From&lt;Box&lt;Path&gt;&gt;</a><a href="#impl-From%3CPathBuf%3E">From&lt;PathBuf&gt;</a><a href="#impl-From%3C%26%27a%20T%3E">From&lt;&amp;&#39;a T&gt;</a><a href="#impl-From%3COsString%3E">From&lt;OsString&gt;</a><a href="#impl-From%3CString%3E">From&lt;String&gt;</a><a href="#impl-FromIterator%3CP%3E">FromIterator&lt;P&gt;</a><a href="#impl-Extend%3CP%3E">Extend&lt;P&gt;</a><a href="#impl-Debug">Debug</a><a href="#impl-Deref">Deref</a><a href="#impl-Borrow%3CPath%3E">Borrow&lt;Path&gt;</a><a href="#impl-Default">Default</a><a href="#impl-PartialEq">PartialEq</a><a href="#impl-Hash">Hash</a><a href="#impl-Eq">Eq</a><a href="#impl-PartialOrd">PartialOrd</a><a href="#impl-Ord">Ord</a><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-IntoIterator">IntoIterator</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-PartialOrd%3CPath%3E">PartialOrd&lt;Path&gt;</a><a href="#impl-PartialOrd%3CPathBuf%3E">PartialOrd&lt;PathBuf&gt;</a><a href="#impl-PartialEq%3C%26%27a%20Path%3E">PartialEq&lt;&amp;&#39;a Path&gt;</a><a href="#impl-PartialOrd%3C%26%27a%20Path%3E">PartialOrd&lt;&amp;&#39;a Path&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-PartialOrd%3CCow%3C%27a%2C%20Path%3E%3E">PartialOrd&lt;Cow&lt;&#39;a, Path&gt;&gt;</a><a href="#impl-PartialEq%3COsStr%3E">PartialEq&lt;OsStr&gt;</a><a href="#impl-PartialOrd%3COsStr%3E">PartialOrd&lt;OsStr&gt;</a><a href="#impl-PartialEq%3C%26%27a%20OsStr%3E">PartialEq&lt;&amp;&#39;a OsStr&gt;</a><a href="#impl-PartialOrd%3C%26%27a%20OsStr%3E">PartialOrd&lt;&amp;&#39;a OsStr&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-PartialOrd%3CCow%3C%27a%2C%20OsStr%3E%3E">PartialOrd&lt;Cow&lt;&#39;a, OsStr&gt;&gt;</a><a href="#impl-PartialEq%3COsString%3E">PartialEq&lt;OsString&gt;</a><a href="#impl-PartialOrd%3COsString%3E">PartialOrd&lt;OsString&gt;</a></div></div><p class='location'><a href='../index.html'>std</a>::<wbr><a href='index.html'>path</a></p><script>window.sidebarCurrent = {name: 'PathBuf', 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="../../brush.svg" width="18" alt="Pick another theme!">
        </button>
        <div id="theme-choices"></div>
    </div>
    <script src="../../theme.js"></script>
    <nav class="sub">
        <form class="search-form js-only">
            <div class="search-container">
                <input class="search-input" name="search"
                       autocomplete="off"
                       placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
                       type="search">
            </div>
        </form>
    </nav>

    <section id='main' class="content">
<h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>std</a>::<wbr><a href='index.html'>path</a>::<wbr><a class="struct" href=''>PathBuf</a></span><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/path.rs.html#1095-1097' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct PathBuf { /* fields omitted */ }</pre><div class='docblock'><p>An owned, mutable path (akin to <a href="../string/struct.String.html"><code>String</code></a>).</p>
<p>This type provides methods like <a href="struct.PathBuf.html#method.push"><code>push</code></a> and <a href="struct.PathBuf.html#method.set_extension"><code>set_extension</code></a> that mutate
the path in place. It also implements <a href="../ops/trait.Deref.html"><code>Deref</code></a> to <a href="struct.Path.html"><code>Path</code></a>, meaning that
all methods on <a href="struct.Path.html"><code>Path</code></a> slices are available on <code>PathBuf</code> values as well.</p>
<p>More details about the overall approach can be found in
the <a href="index.html">module documentation</a>.</p>
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
<p>You can use <a href="struct.PathBuf.html#method.push"><code>push</code></a> to build up a <code>PathBuf</code> from
components:</p>

<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">PathBuf</span>;

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">PathBuf</span>::<span class="ident">new</span>();

<span class="ident">path</span>.<span class="ident">push</span>(<span class="string">r&quot;C:\&quot;</span>);
<span class="ident">path</span>.<span class="ident">push</span>(<span class="string">&quot;windows&quot;</span>);
<span class="ident">path</span>.<span class="ident">push</span>(<span class="string">&quot;system32&quot;</span>);

<span class="ident">path</span>.<span class="ident">set_extension</span>(<span class="string">&quot;dll&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%3Apath%3A%3APathBuf%3B%0A%0Alet%20mut%20path%20%3D%20PathBuf%3A%3Anew()%3B%0A%0Apath.push(r%22C%3A%5C%22)%3B%0Apath.push(%22windows%22)%3B%0Apath.push(%22system32%22)%3B%0A%0Apath.set_extension(%22dll%22)%3B%0A%7D">Run</a></pre>
<p>However, <a href="struct.PathBuf.html#method.push"><code>push</code></a> is best used for dynamic situations. This is a better way
to do this when you know all of the components ahead of time:</p>

<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">PathBuf</span>;

<span class="kw">let</span> <span class="ident">path</span>: <span class="ident">PathBuf</span> <span class="op">=</span> [<span class="string">r&quot;C:\&quot;</span>, <span class="string">&quot;windows&quot;</span>, <span class="string">&quot;system32.dll&quot;</span>].<span class="ident">iter</span>().<span class="ident">collect</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%3Apath%3A%3APathBuf%3B%0A%0Alet%20path%3A%20PathBuf%20%3D%20%5Br%22C%3A%5C%22%2C%20%22windows%22%2C%20%22system32.dll%22%5D.iter().collect()%3B%0A%7D">Run</a></pre>
<p>We can still do better than this! Since these are all strings, we can use
<code>From::from</code>:</p>

<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">PathBuf</span>;

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">PathBuf</span>::<span class="ident">from</span>(<span class="string">r&quot;C:\windows\system32.dll&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%3Apath%3A%3APathBuf%3B%0A%0Alet%20path%20%3D%20PathBuf%3A%3Afrom(r%22C%3A%5Cwindows%5Csystem32.dll%22)%3B%0A%7D">Run</a></pre>
<p>Which method works best depends on what kind of situation you're in.</p>
</div>
                    <h2 id='methods' class='small-section-header'>
                      Methods<a href='#methods' class='anchor'></a>
                    </h2>
                <h3 id='impl' class='impl'><span class='in-band'><code>impl <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1099-1347' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><code>pub fn <a href='#method.new' class='fnname'>new</a>() -&gt; <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1114-1116' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Allocates an empty <code>PathBuf</code>.</p>
<h1 id="examples-1" class="section-header"><a href="#examples-1">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">PathBuf</span>;

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">PathBuf</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%3Apath%3A%3APathBuf%3B%0A%0Alet%20path%20%3D%20PathBuf%3A%3Anew()%3B%0A%7D">Run</a></pre>
</div><h4 id='method.as_path' class="method"><span id='as_path.v' class='invisible'><code>pub fn <a href='#method.as_path' class='fnname'>as_path</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1131-1133' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Coerces to a <a href="struct.Path.html"><code>Path</code></a> slice.</p>
<h1 id="examples-2" class="section-header"><a href="#examples-2">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::{<span class="ident">Path</span>, <span class="ident">PathBuf</span>};

<span class="kw">let</span> <span class="ident">p</span> <span class="op">=</span> <span class="ident">PathBuf</span>::<span class="ident">from</span>(<span class="string">&quot;/test&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/test&quot;</span>), <span class="ident">p</span>.<span class="ident">as_path</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%3Apath%3A%3A%7BPath%2C%20PathBuf%7D%3B%0A%0Alet%20p%20%3D%20PathBuf%3A%3Afrom(%22%2Ftest%22)%3B%0Aassert_eq!(Path%3A%3Anew(%22%2Ftest%22)%2C%20p.as_path())%3B%0A%7D">Run</a></pre>
</div><h4 id='method.push' class="method"><span id='push.v' class='invisible'><code>pub fn <a href='#method.push' class='fnname'>push</a>&lt;P:&nbsp;<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;&gt;(&amp;mut self, path: P)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1167-1169' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Extends <code>self</code> with <code>path</code>.</p>
<p>If <code>path</code> is absolute, it replaces the current path.</p>
<p>On Windows:</p>
<ul>
<li>if <code>path</code> has a root but no prefix (e.g. <code>\windows</code>), it
replaces everything except for the prefix (if any) of <code>self</code>.</li>
<li>if <code>path</code> has a prefix but no root, it replaces <code>self</code>.</li>
</ul>
<h1 id="examples-3" class="section-header"><a href="#examples-3">Examples</a></h1>
<p>Pushing a relative path extends the existing path:</p>

<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">PathBuf</span>;

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">PathBuf</span>::<span class="ident">from</span>(<span class="string">&quot;/tmp&quot;</span>);
<span class="ident">path</span>.<span class="ident">push</span>(<span class="string">&quot;file.bk&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">path</span>, <span class="ident">PathBuf</span>::<span class="ident">from</span>(<span class="string">&quot;/tmp/file.bk&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%3Apath%3A%3APathBuf%3B%0A%0Alet%20mut%20path%20%3D%20PathBuf%3A%3Afrom(%22%2Ftmp%22)%3B%0Apath.push(%22file.bk%22)%3B%0Aassert_eq!(path%2C%20PathBuf%3A%3Afrom(%22%2Ftmp%2Ffile.bk%22))%3B%0A%7D">Run</a></pre>
<p>Pushing an absolute path replaces the existing path:</p>

<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">PathBuf</span>;

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">PathBuf</span>::<span class="ident">from</span>(<span class="string">&quot;/tmp&quot;</span>);
<span class="ident">path</span>.<span class="ident">push</span>(<span class="string">&quot;/etc&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">path</span>, <span class="ident">PathBuf</span>::<span class="ident">from</span>(<span class="string">&quot;/etc&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%3Apath%3A%3APathBuf%3B%0A%0Alet%20mut%20path%20%3D%20PathBuf%3A%3Afrom(%22%2Ftmp%22)%3B%0Apath.push(%22%2Fetc%22)%3B%0Aassert_eq!(path%2C%20PathBuf%3A%3Afrom(%22%2Fetc%22))%3B%0A%7D">Run</a></pre>
</div><h4 id='method.pop' class="method"><span id='pop.v' class='invisible'><code>pub fn <a href='#method.pop' class='fnname'>pop</a>(&amp;mut self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1223-1231' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Truncates <code>self</code> to <a href="struct.PathBuf.html#method.parent"><code>self.parent</code></a>.</p>
<p>Returns <code>false</code> and does nothing if <a href="struct.PathBuf.html#method.file_name"><code>self.file_name</code></a> is <a href="../../std/option/enum.Option.html#variant.None"><code>None</code></a>.
Otherwise, returns <code>true</code>.</p>
<h1 id="examples-4" class="section-header"><a href="#examples-4">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::{<span class="ident">Path</span>, <span class="ident">PathBuf</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">p</span> <span class="op">=</span> <span class="ident">PathBuf</span>::<span class="ident">from</span>(<span class="string">&quot;/test/test.rs&quot;</span>);

<span class="ident">p</span>.<span class="ident">pop</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/test&quot;</span>), <span class="ident">p</span>);
<span class="ident">p</span>.<span class="ident">pop</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/&quot;</span>), <span class="ident">p</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%3Apath%3A%3A%7BPath%2C%20PathBuf%7D%3B%0A%0Alet%20mut%20p%20%3D%20PathBuf%3A%3Afrom(%22%2Ftest%2Ftest.rs%22)%3B%0A%0Ap.pop()%3B%0Aassert_eq!(Path%3A%3Anew(%22%2Ftest%22)%2C%20p)%3B%0Ap.pop()%3B%0Aassert_eq!(Path%3A%3Anew(%22%2F%22)%2C%20p)%3B%0A%7D">Run</a></pre>
</div><h4 id='method.set_file_name' class="method"><span id='set_file_name.v' class='invisible'><code>pub fn <a href='#method.set_file_name' class='fnname'>set_file_name</a>&lt;S:&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, file_name: S)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1260-1262' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Updates <a href="struct.PathBuf.html#method.file_name"><code>self.file_name</code></a> to <code>file_name</code>.</p>
<p>If <a href="struct.PathBuf.html#method.file_name"><code>self.file_name</code></a> was <a href="../../std/option/enum.Option.html#variant.None"><code>None</code></a>, this is equivalent to pushing
<code>file_name</code>.</p>
<p>Otherwise it is equivalent to calling <a href="struct.PathBuf.html#method.pop"><code>pop</code></a> and then pushing
<code>file_name</code>. The new path will be a sibling of the original path.
(That is, it will have the same parent.)</p>
<h1 id="examples-5" class="section-header"><a href="#examples-5">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">PathBuf</span>;

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">PathBuf</span>::<span class="ident">from</span>(<span class="string">&quot;/&quot;</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">buf</span>.<span class="ident">file_name</span>() <span class="op">==</span> <span class="prelude-val">None</span>);
<span class="ident">buf</span>.<span class="ident">set_file_name</span>(<span class="string">&quot;bar&quot;</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">buf</span> <span class="op">==</span> <span class="ident">PathBuf</span>::<span class="ident">from</span>(<span class="string">&quot;/bar&quot;</span>));
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">buf</span>.<span class="ident">file_name</span>().<span class="ident">is_some</span>());
<span class="ident">buf</span>.<span class="ident">set_file_name</span>(<span class="string">&quot;baz.txt&quot;</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">buf</span> <span class="op">==</span> <span class="ident">PathBuf</span>::<span class="ident">from</span>(<span class="string">&quot;/baz.txt&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%3Apath%3A%3APathBuf%3B%0A%0Alet%20mut%20buf%20%3D%20PathBuf%3A%3Afrom(%22%2F%22)%3B%0Aassert!(buf.file_name()%20%3D%3D%20None)%3B%0Abuf.set_file_name(%22bar%22)%3B%0Aassert!(buf%20%3D%3D%20PathBuf%3A%3Afrom(%22%2Fbar%22))%3B%0Aassert!(buf.file_name().is_some())%3B%0Abuf.set_file_name(%22baz.txt%22)%3B%0Aassert!(buf%20%3D%3D%20PathBuf%3A%3Afrom(%22%2Fbaz.txt%22))%3B%0A%7D">Run</a></pre>
</div><h4 id='method.set_extension' class="method"><span id='set_extension.v' class='invisible'><code>pub fn <a href='#method.set_extension' class='fnname'>set_extension</a>&lt;S:&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, extension: S) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1298-1300' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Updates <a href="struct.PathBuf.html#method.extension"><code>self.extension</code></a> to <code>extension</code>.</p>
<p>Returns <code>false</code> and does nothing if <a href="struct.PathBuf.html#method.file_name"><code>self.file_name</code></a> is <a href="../../std/option/enum.Option.html#variant.None"><code>None</code></a>,
returns <code>true</code> and updates the extension otherwise.</p>
<p>If <a href="struct.PathBuf.html#method.extension"><code>self.extension</code></a> is <a href="../../std/option/enum.Option.html#variant.None"><code>None</code></a>, the extension is added; otherwise
it is replaced.</p>
<h1 id="examples-6" class="section-header"><a href="#examples-6">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::{<span class="ident">Path</span>, <span class="ident">PathBuf</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">p</span> <span class="op">=</span> <span class="ident">PathBuf</span>::<span class="ident">from</span>(<span class="string">&quot;/feel/the&quot;</span>);

<span class="ident">p</span>.<span class="ident">set_extension</span>(<span class="string">&quot;force&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/feel/the.force&quot;</span>), <span class="ident">p</span>.<span class="ident">as_path</span>());

<span class="ident">p</span>.<span class="ident">set_extension</span>(<span class="string">&quot;dark_side&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/feel/the.dark_side&quot;</span>), <span class="ident">p</span>.<span class="ident">as_path</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%3Apath%3A%3A%7BPath%2C%20PathBuf%7D%3B%0A%0Alet%20mut%20p%20%3D%20PathBuf%3A%3Afrom(%22%2Ffeel%2Fthe%22)%3B%0A%0Ap.set_extension(%22force%22)%3B%0Aassert_eq!(Path%3A%3Anew(%22%2Ffeel%2Fthe.force%22)%2C%20p.as_path())%3B%0A%0Ap.set_extension(%22dark_side%22)%3B%0Aassert_eq!(Path%3A%3Anew(%22%2Ffeel%2Fthe.dark_side%22)%2C%20p.as_path())%3B%0A%7D">Run</a></pre>
</div><h4 id='method.into_os_string' class="method"><span id='into_os_string.v' class='invisible'><code>pub fn <a href='#method.into_os_string' class='fnname'>into_os_string</a>(self) -&gt; <a class="struct" href="../../std/ffi/struct.OsString.html" title="struct std::ffi::OsString">OsString</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1334-1336' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Consumes the <code>PathBuf</code>, yielding its internal <a href="../ffi/struct.OsString.html"><code>OsString</code></a> storage.</p>
<h1 id="examples-7" class="section-header"><a href="#examples-7">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">PathBuf</span>;

<span class="kw">let</span> <span class="ident">p</span> <span class="op">=</span> <span class="ident">PathBuf</span>::<span class="ident">from</span>(<span class="string">&quot;/the/head&quot;</span>);
<span class="kw">let</span> <span class="ident">os_str</span> <span class="op">=</span> <span class="ident">p</span>.<span class="ident">into_os_string</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%3Apath%3A%3APathBuf%3B%0A%0Alet%20p%20%3D%20PathBuf%3A%3Afrom(%22%2Fthe%2Fhead%22)%3B%0Alet%20os_str%20%3D%20p.into_os_string()%3B%0A%7D">Run</a></pre>
</div><h4 id='method.into_boxed_path' 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;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><span id='into_boxed_path.v' class='invisible'><code>pub fn <a href='#method.into_boxed_path' class='fnname'>into_boxed_path</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/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.20.0'>1.20.0</div><a class='srclink' href='../../src/std/path.rs.html#1343-1346' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Converts this <code>PathBuf</code> into a <a href="../../std/boxed/struct.Box.html">boxed</a> <a href="struct.Path.html"><code>Path</code></a>.</p>
</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/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;<a href='#deref-methods' class='anchor'></a>
                    </h2>
                <div class='impl-items'><h4 id='method.as_os_str' class="method"><span id='as_os_str.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1653-1655' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Yields the underlying <a href="../ffi/struct.OsStr.html"><code>OsStr</code></a> slice.</p>
<h1 id="examples-8" class="section-header"><a href="#examples-8">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;

<span class="kw">let</span> <span class="ident">os_str</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;foo.txt&quot;</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">std</span>::<span class="ident">ffi</span>::<span class="ident">OsStr</span>::<span class="ident">new</span>(<span class="string">&quot;foo.txt&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%3Apath%3A%3APath%3B%0A%0Alet%20os_str%20%3D%20Path%3A%3Anew(%22foo.txt%22).as_os_str()%3B%0Aassert_eq!(os_str%2C%20std%3A%3Affi%3A%3AOsStr%3A%3Anew(%22foo.txt%22))%3B%0A%7D">Run</a></pre>
</div><h4 id='method.to_str' class="method"><span id='to_str.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1672-1674' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Yields a <a href="../primitive.str.html"><code>&amp;str</code></a> slice if the <code>Path</code> is valid unicode.</p>
<p>This conversion may entail doing a check for UTF-8 validity.</p>
<h1 id="examples-9" class="section-header"><a href="#examples-9">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;foo.txt&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">path</span>.<span class="ident">to_str</span>(), <span class="prelude-val">Some</span>(<span class="string">&quot;foo.txt&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%3Apath%3A%3APath%3B%0A%0Alet%20path%20%3D%20Path%3A%3Anew(%22foo.txt%22)%3B%0Aassert_eq!(path.to_str()%2C%20Some(%22foo.txt%22))%3B%0A%7D">Run</a></pre>
</div><h4 id='method.to_string_lossy' class="method"><span id='to_string_lossy.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1696-1698' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Converts a <code>Path</code> to a <a href="../borrow/enum.Cow.html"><code>Cow&lt;str&gt;</code></a>.</p>
<p>Any non-Unicode sequences are replaced with U+FFFD REPLACEMENT CHARACTER.</p>
<h1 id="examples-10" class="section-header"><a href="#examples-10">Examples</a></h1>
<p>Calling <code>to_string_lossy</code> on a <code>Path</code> with valid unicode:</p>

<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;foo.txt&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">path</span>.<span class="ident">to_string_lossy</span>(), <span class="string">&quot;foo.txt&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%3Apath%3A%3APath%3B%0A%0Alet%20path%20%3D%20Path%3A%3Anew(%22foo.txt%22)%3B%0Aassert_eq!(path.to_string_lossy()%2C%20%22foo.txt%22)%3B%0A%7D">Run</a></pre>
<p>Had <code>path</code> contained invalid unicode, the <code>to_string_lossy</code> call might
have returned <code>&quot;fo�.txt&quot;</code>.</p>
</div><h4 id='method.to_path_buf' class="method"><span id='to_path_buf.v' class='invisible'><code>pub fn <a href='#method.to_path_buf' class='fnname'>to_path_buf</a>(&amp;self) -&gt; <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1714-1716' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Converts a <code>Path</code> to an owned <a href="struct.PathBuf.html"><code>PathBuf</code></a>.</p>
<h1 id="examples-11" class="section-header"><a href="#examples-11">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;

<span class="kw">let</span> <span class="ident">path_buf</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;foo.txt&quot;</span>).<span class="ident">to_path_buf</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">path_buf</span>, <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">PathBuf</span>::<span class="ident">from</span>(<span class="string">&quot;foo.txt&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%3Apath%3A%3APath%3B%0A%0Alet%20path_buf%20%3D%20Path%3A%3Anew(%22foo.txt%22).to_path_buf()%3B%0Aassert_eq!(path_buf%2C%20std%3A%3Apath%3A%3APathBuf%3A%3Afrom(%22foo.txt%22))%3B%0A%7D">Run</a></pre>
</div><h4 id='method.is_absolute' class="method"><span id='is_absolute.v' class='invisible'><code>pub fn <a href='#method.is_absolute' class='fnname'>is_absolute</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1738-1745' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns <code>true</code> if the <code>Path</code> is absolute, i.e. if it is independent of
the current directory.</p>
<ul>
<li>
<p>On Unix, a path is absolute if it starts with the root, so
<code>is_absolute</code> and <a href="#method.has_root"><code>has_root</code></a> are equivalent.</p>
</li>
<li>
<p>On Windows, a path is absolute if it has a prefix and starts with the
root: <code>c:\windows</code> is absolute, while <code>c:temp</code> and <code>\temp</code> are not.</p>
</li>
</ul>
<h1 id="examples-12" class="section-header"><a href="#examples-12">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;

<span class="macro">assert</span><span class="macro">!</span>(<span class="op">!</span><span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;foo.txt&quot;</span>).<span class="ident">is_absolute</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%3Apath%3A%3APath%3B%0A%0Aassert!(!Path%3A%3Anew(%22foo.txt%22).is_absolute())%3B%0A%7D">Run</a></pre>
</div><h4 id='method.is_relative' class="method"><span id='is_relative.v' class='invisible'><code>pub fn <a href='#method.is_relative' class='fnname'>is_relative</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1761-1763' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns <code>true</code> if the <code>Path</code> is relative, i.e. not absolute.</p>
<p>See <a href="#method.is_absolute"><code>is_absolute</code></a>'s documentation for more details.</p>
<h1 id="examples-13" class="section-header"><a href="#examples-13">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;

<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;foo.txt&quot;</span>).<span class="ident">is_relative</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%3Apath%3A%3APath%3B%0A%0Aassert!(Path%3A%3Anew(%22foo.txt%22).is_relative())%3B%0A%7D">Run</a></pre>
</div><h4 id='method.has_root' class="method"><span id='has_root.v' class='invisible'><code>pub fn <a href='#method.has_root' class='fnname'>has_root</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1786-1788' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns <code>true</code> if the <code>Path</code> has a root.</p>
<ul>
<li>
<p>On Unix, a path has a root if it begins with <code>/</code>.</p>
</li>
<li>
<p>On Windows, a path has a root if it:</p>
<ul>
<li>has no prefix and begins with a separator, e.g. <code>\\windows</code></li>
<li>has a prefix followed by a separator, e.g. <code>c:\windows</code> but not <code>c:windows</code></li>
<li>has any non-disk prefix, e.g. <code>\\server\share</code></li>
</ul>
</li>
</ul>
<h1 id="examples-14" class="section-header"><a href="#examples-14">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;

<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/etc/passwd&quot;</span>).<span class="ident">has_root</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%3Apath%3A%3APath%3B%0A%0Aassert!(Path%3A%3Anew(%22%2Fetc%2Fpasswd%22).has_root())%3B%0A%7D">Run</a></pre>
</div><h4 id='method.parent' class="method"><span id='parent.v' class='invisible'><code>pub fn <a href='#method.parent' class='fnname'>parent</a>(&amp;self) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;&amp;<a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1810-1821' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the <code>Path</code> without its final component, if there is one.</p>
<p>Returns <a href="../../std/option/enum.Option.html#variant.None"><code>None</code></a> if the path terminates in a root or prefix.</p>
<h1 id="examples-15" class="section-header"><a href="#examples-15">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/foo/bar&quot;</span>);
<span class="kw">let</span> <span class="ident">parent</span> <span class="op">=</span> <span class="ident">path</span>.<span class="ident">parent</span>().<span class="ident">unwrap</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">parent</span>, <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/foo&quot;</span>));

<span class="kw">let</span> <span class="ident">grand_parent</span> <span class="op">=</span> <span class="ident">parent</span>.<span class="ident">parent</span>().<span class="ident">unwrap</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">grand_parent</span>, <span class="ident">Path</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">grand_parent</span>.<span class="ident">parent</span>(), <span class="prelude-val">None</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%3Apath%3A%3APath%3B%0A%0Alet%20path%20%3D%20Path%3A%3Anew(%22%2Ffoo%2Fbar%22)%3B%0Alet%20parent%20%3D%20path.parent().unwrap()%3B%0Aassert_eq!(parent%2C%20Path%3A%3Anew(%22%2Ffoo%22))%3B%0A%0Alet%20grand_parent%20%3D%20parent.parent().unwrap()%3B%0Aassert_eq!(grand_parent%2C%20Path%3A%3Anew(%22%2F%22))%3B%0Aassert_eq!(grand_parent.parent()%2C%20None)%3B%0A%7D">Run</a></pre>
</div><h4 id='method.file_name' class="method"><span id='file_name.v' class='invisible'><code>pub fn <a href='#method.file_name' class='fnname'>file_name</a>(&amp;self) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;&amp;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1846-1853' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the final component of the <code>Path</code>, if there is one.</p>
<p>If the path is a normal file, this is the file name. If it's the path of a directory, this
is the directory name.</p>
<p>Returns <a href="../../std/option/enum.Option.html#variant.None"><code>None</code></a> If the path terminates in <code>..</code>.</p>
<h1 id="examples-16" class="section-header"><a href="#examples-16">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ffi</span>::<span class="ident">OsStr</span>;

<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="prelude-val">Some</span>(<span class="ident">OsStr</span>::<span class="ident">new</span>(<span class="string">&quot;bin&quot;</span>)), <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/usr/bin/&quot;</span>).<span class="ident">file_name</span>());
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="prelude-val">Some</span>(<span class="ident">OsStr</span>::<span class="ident">new</span>(<span class="string">&quot;foo.txt&quot;</span>)), <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;tmp/foo.txt&quot;</span>).<span class="ident">file_name</span>());
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="prelude-val">Some</span>(<span class="ident">OsStr</span>::<span class="ident">new</span>(<span class="string">&quot;foo.txt&quot;</span>)), <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;foo.txt/.&quot;</span>).<span class="ident">file_name</span>());
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="prelude-val">Some</span>(<span class="ident">OsStr</span>::<span class="ident">new</span>(<span class="string">&quot;foo.txt&quot;</span>)), <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;foo.txt/.//&quot;</span>).<span class="ident">file_name</span>());
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="prelude-val">None</span>, <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;foo.txt/..&quot;</span>).<span class="ident">file_name</span>());
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="prelude-val">None</span>, <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/&quot;</span>).<span class="ident">file_name</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%3Apath%3A%3APath%3B%0Ause%20std%3A%3Affi%3A%3AOsStr%3B%0A%0Aassert_eq!(Some(OsStr%3A%3Anew(%22bin%22))%2C%20Path%3A%3Anew(%22%2Fusr%2Fbin%2F%22).file_name())%3B%0Aassert_eq!(Some(OsStr%3A%3Anew(%22foo.txt%22))%2C%20Path%3A%3Anew(%22tmp%2Ffoo.txt%22).file_name())%3B%0Aassert_eq!(Some(OsStr%3A%3Anew(%22foo.txt%22))%2C%20Path%3A%3Anew(%22foo.txt%2F.%22).file_name())%3B%0Aassert_eq!(Some(OsStr%3A%3Anew(%22foo.txt%22))%2C%20Path%3A%3Anew(%22foo.txt%2F.%2F%2F%22).file_name())%3B%0Aassert_eq!(None%2C%20Path%3A%3Anew(%22foo.txt%2F..%22).file_name())%3B%0Aassert_eq!(None%2C%20Path%3A%3Anew(%22%2F%22).file_name())%3B%0A%7D">Run</a></pre>
</div><h4 id='method.strip_prefix' class="method"><span id='strip_prefix.v' class='invisible'><code>pub fn <a href='#method.strip_prefix' class='fnname'>strip_prefix</a>&lt;'a, P:&nbsp;?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;'a self, <br>&nbsp;&nbsp;&nbsp;&nbsp;base: <a class="primitive" href="../primitive.reference.html">&amp;'a </a>P<br>) -&gt; <a class="enum" href="../../std/result/enum.Result.html" title="enum std::result::Result">Result</a>&lt;&amp;'a <a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>, <a class="struct" href="../../std/path/struct.StripPrefixError.html" title="struct std::path::StripPrefixError">StripPrefixError</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;P: <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;,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.7.0'>1.7.0</div><a class='srclink' href='../../src/std/path.rs.html#1881-1886' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns a path that, when joined onto <code>base</code>, yields <code>self</code>.</p>
<h1 id="errors" class="section-header"><a href="#errors">Errors</a></h1>
<p>If <code>base</code> is not a prefix of <code>self</code> (i.e. <a href="#method.starts_with"><code>starts_with</code></a>
returns <code>false</code>), returns <a href="../../std/result/enum.Result.html#variant.Err"><code>Err</code></a>.</p>
<h1 id="examples-17" class="section-header"><a href="#examples-17">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/test/haha/foo.txt&quot;</span>);

<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">path</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;/&quot;</span>), <span class="prelude-val">Ok</span>(<span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;test/haha/foo.txt&quot;</span>)));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">path</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;/test&quot;</span>), <span class="prelude-val">Ok</span>(<span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;haha/foo.txt&quot;</span>)));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">path</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;/test/&quot;</span>), <span class="prelude-val">Ok</span>(<span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;haha/foo.txt&quot;</span>)));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">path</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;/test/haha/foo.txt&quot;</span>), <span class="prelude-val">Ok</span>(<span class="ident">Path</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">path</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;/test/haha/foo.txt/&quot;</span>), <span class="prelude-val">Ok</span>(<span class="ident">Path</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">path</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;test&quot;</span>).<span class="ident">is_ok</span>(), <span class="bool-val">false</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">path</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;/haha&quot;</span>).<span class="ident">is_ok</span>(), <span class="bool-val">false</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%3Apath%3A%3APath%3B%0A%0Alet%20path%20%3D%20Path%3A%3Anew(%22%2Ftest%2Fhaha%2Ffoo.txt%22)%3B%0A%0Aassert_eq!(path.strip_prefix(%22%2F%22)%2C%20Ok(Path%3A%3Anew(%22test%2Fhaha%2Ffoo.txt%22)))%3B%0Aassert_eq!(path.strip_prefix(%22%2Ftest%22)%2C%20Ok(Path%3A%3Anew(%22haha%2Ffoo.txt%22)))%3B%0Aassert_eq!(path.strip_prefix(%22%2Ftest%2F%22)%2C%20Ok(Path%3A%3Anew(%22haha%2Ffoo.txt%22)))%3B%0Aassert_eq!(path.strip_prefix(%22%2Ftest%2Fhaha%2Ffoo.txt%22)%2C%20Ok(Path%3A%3Anew(%22%22)))%3B%0Aassert_eq!(path.strip_prefix(%22%2Ftest%2Fhaha%2Ffoo.txt%2F%22)%2C%20Ok(Path%3A%3Anew(%22%22)))%3B%0Aassert_eq!(path.strip_prefix(%22test%22).is_ok()%2C%20false)%3B%0Aassert_eq!(path.strip_prefix(%22%2Fhaha%22).is_ok()%2C%20false)%3B%0A%7D">Run</a></pre>
</div><h4 id='method.starts_with' class="method"><span id='starts_with.v' class='invisible'><code>pub fn <a href='#method.starts_with' class='fnname'>starts_with</a>&lt;P:&nbsp;<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;&gt;(&amp;self, base: P) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1914-1916' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Determines whether <code>base</code> is a prefix of <code>self</code>.</p>
<p>Only considers whole path components to match.</p>
<h1 id="examples-18" class="section-header"><a href="#examples-18">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/etc/passwd&quot;</span>);

<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">path</span>.<span class="ident">starts_with</span>(<span class="string">&quot;/etc&quot;</span>));
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">path</span>.<span class="ident">starts_with</span>(<span class="string">&quot;/etc/&quot;</span>));
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">path</span>.<span class="ident">starts_with</span>(<span class="string">&quot;/etc/passwd&quot;</span>));
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">path</span>.<span class="ident">starts_with</span>(<span class="string">&quot;/etc/passwd/&quot;</span>));

<span class="macro">assert</span><span class="macro">!</span>(<span class="op">!</span><span class="ident">path</span>.<span class="ident">starts_with</span>(<span class="string">&quot;/e&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%3Apath%3A%3APath%3B%0A%0Alet%20path%20%3D%20Path%3A%3Anew(%22%2Fetc%2Fpasswd%22)%3B%0A%0Aassert!(path.starts_with(%22%2Fetc%22))%3B%0Aassert!(path.starts_with(%22%2Fetc%2F%22))%3B%0Aassert!(path.starts_with(%22%2Fetc%2Fpasswd%22))%3B%0Aassert!(path.starts_with(%22%2Fetc%2Fpasswd%2F%22))%3B%0A%0Aassert!(!path.starts_with(%22%2Fe%22))%3B%0A%7D">Run</a></pre>
</div><h4 id='method.ends_with' class="method"><span id='ends_with.v' class='invisible'><code>pub fn <a href='#method.ends_with' class='fnname'>ends_with</a>&lt;P:&nbsp;<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;&gt;(&amp;self, child: P) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1936-1938' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Determines whether <code>child</code> is a suffix of <code>self</code>.</p>
<p>Only considers whole path components to match.</p>
<h1 id="examples-19" class="section-header"><a href="#examples-19">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/etc/passwd&quot;</span>);

<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">path</span>.<span class="ident">ends_with</span>(<span class="string">&quot;passwd&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%3Apath%3A%3APath%3B%0A%0Alet%20path%20%3D%20Path%3A%3Anew(%22%2Fetc%2Fpasswd%22)%3B%0A%0Aassert!(path.ends_with(%22passwd%22))%3B%0A%7D">Run</a></pre>
</div><h4 id='method.file_stem' class="method"><span id='file_stem.v' class='invisible'><code>pub fn <a href='#method.file_stem' class='fnname'>file_stem</a>(&amp;self) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;&amp;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1967-1969' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Extracts the stem (non-extension) portion of <a href="struct.Path.html#method.file_name"><code>self.file_name</code></a>.</p>
<p>The stem is:</p>
<ul>
<li><a href="../../std/option/enum.Option.html#variant.None"><code>None</code></a>, if there is no file name;</li>
<li>The entire file name if there is no embedded <code>.</code>;</li>
<li>The entire file name if the file name begins with <code>.</code> and has no other <code>.</code>s within;</li>
<li>Otherwise, the portion of the file name before the final <code>.</code></li>
</ul>
<h1 id="examples-20" class="section-header"><a href="#examples-20">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;foo.rs&quot;</span>);

<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="string">&quot;foo&quot;</span>, <span class="ident">path</span>.<span class="ident">file_stem</span>().<span class="ident">unwrap</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%3Apath%3A%3APath%3B%0A%0Alet%20path%20%3D%20Path%3A%3Anew(%22foo.rs%22)%3B%0A%0Aassert_eq!(%22foo%22%2C%20path.file_stem().unwrap())%3B%0A%7D">Run</a></pre>
</div><h4 id='method.extension' class="method"><span id='extension.v' class='invisible'><code>pub fn <a href='#method.extension' class='fnname'>extension</a>(&amp;self) -&gt; <a class="enum" href="../../std/option/enum.Option.html" title="enum std::option::Option">Option</a>&lt;&amp;<a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1993-1995' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Extracts the extension of <a href="struct.Path.html#method.file_name"><code>self.file_name</code></a>, if possible.</p>
<p>The extension is:</p>
<ul>
<li><a href="../../std/option/enum.Option.html#variant.None"><code>None</code></a>, if there is no file name;</li>
<li><a href="../../std/option/enum.Option.html#variant.None"><code>None</code></a>, if there is no embedded <code>.</code>;</li>
<li><a href="../../std/option/enum.Option.html#variant.None"><code>None</code></a>, if the file name begins with <code>.</code> and has no other <code>.</code>s within;</li>
<li>Otherwise, the portion of the file name after the final <code>.</code></li>
</ul>
<h1 id="examples-21" class="section-header"><a href="#examples-21">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;foo.rs&quot;</span>);

<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="string">&quot;rs&quot;</span>, <span class="ident">path</span>.<span class="ident">extension</span>().<span class="ident">unwrap</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%3Apath%3A%3APath%3B%0A%0Alet%20path%20%3D%20Path%3A%3Anew(%22foo.rs%22)%3B%0A%0Aassert_eq!(%22rs%22%2C%20path.extension().unwrap())%3B%0A%7D">Run</a></pre>
</div><h4 id='method.join' class="method"><span id='join.v' class='invisible'><code>pub fn <a href='#method.join' class='fnname'>join</a>&lt;P:&nbsp;<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;&gt;(&amp;self, path: P) -&gt; <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2012-2014' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates an owned <a href="struct.PathBuf.html"><code>PathBuf</code></a> with <code>path</code> adjoined to <code>self</code>.</p>
<p>See <a href="struct.PathBuf.html#method.push"><code>PathBuf::push</code></a> for more details on what it means to adjoin a path.</p>
<h1 id="examples-22" class="section-header"><a href="#examples-22">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::{<span class="ident">Path</span>, <span class="ident">PathBuf</span>};

<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/etc&quot;</span>).<span class="ident">join</span>(<span class="string">&quot;passwd&quot;</span>), <span class="ident">PathBuf</span>::<span class="ident">from</span>(<span class="string">&quot;/etc/passwd&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%3Apath%3A%3A%7BPath%2C%20PathBuf%7D%3B%0A%0Aassert_eq!(Path%3A%3Anew(%22%2Fetc%22).join(%22passwd%22)%2C%20PathBuf%3A%3Afrom(%22%2Fetc%2Fpasswd%22))%3B%0A%7D">Run</a></pre>
</div><h4 id='method.with_file_name' class="method"><span id='with_file_name.v' class='invisible'><code>pub fn <a href='#method.with_file_name' class='fnname'>with_file_name</a>&lt;S:&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;self, file_name: S) -&gt; <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2041-2043' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates an owned <a href="struct.PathBuf.html"><code>PathBuf</code></a> like <code>self</code> but with the given file name.</p>
<p>See <a href="struct.PathBuf.html#method.set_file_name"><code>PathBuf::set_file_name</code></a> for more details.</p>
<h1 id="examples-23" class="section-header"><a href="#examples-23">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::{<span class="ident">Path</span>, <span class="ident">PathBuf</span>};

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/tmp/foo.txt&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">path</span>.<span class="ident">with_file_name</span>(<span class="string">&quot;bar.txt&quot;</span>), <span class="ident">PathBuf</span>::<span class="ident">from</span>(<span class="string">&quot;/tmp/bar.txt&quot;</span>));

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/tmp&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">path</span>.<span class="ident">with_file_name</span>(<span class="string">&quot;var&quot;</span>), <span class="ident">PathBuf</span>::<span class="ident">from</span>(<span class="string">&quot;/var&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%3Apath%3A%3A%7BPath%2C%20PathBuf%7D%3B%0A%0Alet%20path%20%3D%20Path%3A%3Anew(%22%2Ftmp%2Ffoo.txt%22)%3B%0Aassert_eq!(path.with_file_name(%22bar.txt%22)%2C%20PathBuf%3A%3Afrom(%22%2Ftmp%2Fbar.txt%22))%3B%0A%0Alet%20path%20%3D%20Path%3A%3Anew(%22%2Ftmp%22)%3B%0Aassert_eq!(path.with_file_name(%22var%22)%2C%20PathBuf%3A%3Afrom(%22%2Fvar%22))%3B%0A%7D">Run</a></pre>
</div><h4 id='method.with_extension' class="method"><span id='with_extension.v' class='invisible'><code>pub fn <a href='#method.with_extension' class='fnname'>with_extension</a>&lt;S:&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;self, extension: S) -&gt; <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2067-2069' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates an owned <a href="struct.PathBuf.html"><code>PathBuf</code></a> like <code>self</code> but with the given extension.</p>
<p>See <a href="struct.PathBuf.html#method.set_extension"><code>PathBuf::set_extension</code></a> for more details.</p>
<h1 id="examples-24" class="section-header"><a href="#examples-24">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::{<span class="ident">Path</span>, <span class="ident">PathBuf</span>};

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;foo.rs&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">path</span>.<span class="ident">with_extension</span>(<span class="string">&quot;txt&quot;</span>), <span class="ident">PathBuf</span>::<span class="ident">from</span>(<span class="string">&quot;foo.txt&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%3Apath%3A%3A%7BPath%2C%20PathBuf%7D%3B%0A%0Alet%20path%20%3D%20Path%3A%3Anew(%22foo.rs%22)%3B%0Aassert_eq!(path.with_extension(%22txt%22)%2C%20PathBuf%3A%3Afrom(%22foo.txt%22))%3B%0A%7D">Run</a></pre>
</div><h4 id='method.components' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../std/path/struct.Components.html" title="struct std::path::Components">Components</a>&lt;'a&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../std/path/struct.Components.html" title="struct std::path::Components">Components</a>&lt;'a&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;'a&gt; <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a> for <a class="struct" href="../../std/path/struct.Components.html" title="struct std::path::Components">Components</a>&lt;'a&gt;</span><span class="where fmt-newline">    type <a href='../../std/iter/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="enum" href="../../std/path/enum.Component.html" title="enum std::path::Component">Component</a>&lt;'a&gt;;</span></code></div></div><span id='components.v' class='invisible'><code>pub fn <a href='#method.components' class='fnname'>components</a>(&amp;self) -&gt; <a class="struct" href="../../std/path/struct.Components.html" title="struct std::path::Components">Components</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2110-2120' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Produces an iterator over the <a href="enum.Component.html"><code>Component</code></a>s of the path.</p>
<p>When parsing the path, there is a small amount of normalization:</p>
<ul>
<li>
<p>Repeated separators are ignored, so <code>a/b</code> and <code>a//b</code> both have
<code>a</code> and <code>b</code> as components.</p>
</li>
<li>
<p>Occurrences of <code>.</code> are normalized away, except if they are at the
beginning of the path. For example, <code>a/./b</code>, <code>a/b/</code>, <code>a/b/.</code> and
<code>a/b</code> all have <code>a</code> and <code>b</code> as components, but <code>./a/b</code> starts with
an additional <a href="enum.Component.html#variant.CurDir"><code>CurDir</code></a> component.</p>
</li>
</ul>
<p>Note that no other normalization takes place; in particular, <code>a/c</code>
and <code>a/b/../c</code> are distinct, to account for the possibility that <code>b</code>
is a symbolic link (so its parent isn't <code>a</code>).</p>
<h1 id="examples-25" class="section-header"><a href="#examples-25">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::{<span class="ident">Path</span>, <span class="ident">Component</span>};
<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="kw-2">mut</span> <span class="ident">components</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/tmp/foo.txt&quot;</span>).<span class="ident">components</span>();

<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">components</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="ident">Component</span>::<span class="ident">RootDir</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">components</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="ident">Component</span>::<span class="ident">Normal</span>(<span class="ident">OsStr</span>::<span class="ident">new</span>(<span class="string">&quot;tmp&quot;</span>))));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">components</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="ident">Component</span>::<span class="ident">Normal</span>(<span class="ident">OsStr</span>::<span class="ident">new</span>(<span class="string">&quot;foo.txt&quot;</span>))));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">components</span>.<span class="ident">next</span>(), <span class="prelude-val">None</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%3Apath%3A%3A%7BPath%2C%20Component%7D%3B%0Ause%20std%3A%3Affi%3A%3AOsStr%3B%0A%0Alet%20mut%20components%20%3D%20Path%3A%3Anew(%22%2Ftmp%2Ffoo.txt%22).components()%3B%0A%0Aassert_eq!(components.next()%2C%20Some(Component%3A%3ARootDir))%3B%0Aassert_eq!(components.next()%2C%20Some(Component%3A%3ANormal(OsStr%3A%3Anew(%22tmp%22))))%3B%0Aassert_eq!(components.next()%2C%20Some(Component%3A%3ANormal(OsStr%3A%3Anew(%22foo.txt%22))))%3B%0Aassert_eq!(components.next()%2C%20None)%0A%7D">Run</a></pre>
</div><h4 id='method.iter' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../std/path/struct.Iter.html" title="struct std::path::Iter">Iter</a>&lt;'a&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../std/path/struct.Iter.html" title="struct std::path::Iter">Iter</a>&lt;'a&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;'a&gt; <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a> for <a class="struct" href="../../std/path/struct.Iter.html" title="struct std::path::Iter">Iter</a>&lt;'a&gt;</span><span class="where fmt-newline">    type <a href='../../std/iter/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = &amp;'a <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>;</span></code></div></div><span id='iter.v' class='invisible'><code>pub fn <a href='#method.iter' class='fnname'>iter</a>(&amp;self) -&gt; <a class="struct" href="../../std/path/struct.Iter.html" title="struct std::path::Iter">Iter</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2144-2146' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Produces an iterator over the path's components viewed as <a href="../ffi/struct.OsStr.html"><code>OsStr</code></a>
slices.</p>
<p>For more information about the particulars of how the path is separated
into components, see <a href="#method.components"><code>components</code></a>.</p>
<h1 id="examples-26" class="section-header"><a href="#examples-26">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::{<span class="self">self</span>, <span class="ident">Path</span>};
<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="kw-2">mut</span> <span class="ident">it</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/tmp/foo.txt&quot;</span>).<span class="ident">iter</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">it</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="ident">OsStr</span>::<span class="ident">new</span>(<span class="kw-2">&amp;</span><span class="ident">path</span>::<span class="ident">MAIN_SEPARATOR</span>.<span class="ident">to_string</span>())));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">it</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="ident">OsStr</span>::<span class="ident">new</span>(<span class="string">&quot;tmp&quot;</span>)));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">it</span>.<span class="ident">next</span>(), <span class="prelude-val">Some</span>(<span class="ident">OsStr</span>::<span class="ident">new</span>(<span class="string">&quot;foo.txt&quot;</span>)));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">it</span>.<span class="ident">next</span>(), <span class="prelude-val">None</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%3Apath%3A%3A%7Bself%2C%20Path%7D%3B%0Ause%20std%3A%3Affi%3A%3AOsStr%3B%0A%0Alet%20mut%20it%20%3D%20Path%3A%3Anew(%22%2Ftmp%2Ffoo.txt%22).iter()%3B%0Aassert_eq!(it.next()%2C%20Some(OsStr%3A%3Anew(%26path%3A%3AMAIN_SEPARATOR.to_string())))%3B%0Aassert_eq!(it.next()%2C%20Some(OsStr%3A%3Anew(%22tmp%22)))%3B%0Aassert_eq!(it.next()%2C%20Some(OsStr%3A%3Anew(%22foo.txt%22)))%3B%0Aassert_eq!(it.next()%2C%20None)%0A%7D">Run</a></pre>
</div><h4 id='method.display' class="method"><span id='display.v' class='invisible'><code>pub fn <a href='#method.display' class='fnname'>display</a>(&amp;self) -&gt; <a class="struct" href="../../std/path/struct.Display.html" title="struct std::path::Display">Display</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2163-2165' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns an object that implements <a href="../fmt/trait.Display.html"><code>Display</code></a> for safely printing paths
that may contain non-Unicode data.</p>
<h1 id="examples-27" class="section-header"><a href="#examples-27">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/tmp/foo.rs&quot;</span>);

<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;{}&quot;</span>, <span class="ident">path</span>.<span class="ident">display</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%3Apath%3A%3APath%3B%0A%0Alet%20path%20%3D%20Path%3A%3Anew(%22%2Ftmp%2Ffoo.rs%22)%3B%0A%0Aprintln!(%22%7B%7D%22%2C%20path.display())%3B%0A%7D">Run</a></pre>
</div><h4 id='method.metadata' class="method"><span id='metadata.v' class='invisible'><code>pub fn <a href='#method.metadata' class='fnname'>metadata</a>(&amp;self) -&gt; <a class="type" href="../../std/io/type.Result.html" title="type std::io::Result">Result</a>&lt;<a class="struct" href="../../std/fs/struct.Metadata.html" title="struct std::fs::Metadata">Metadata</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.5.0'>1.5.0</div><a class='srclink' href='../../src/std/path.rs.html#2186-2188' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Queries the file system to get information about a file, directory, etc.</p>
<p>This function will traverse symbolic links to query information about the
destination file.</p>
<p>This is an alias to <a href="../fs/fn.metadata.html"><code>fs::metadata</code></a>.</p>
<h1 id="examples-28" class="section-header"><a href="#examples-28">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/Minas/tirith&quot;</span>);
<span class="kw">let</span> <span class="ident">metadata</span> <span class="op">=</span> <span class="ident">path</span>.<span class="ident">metadata</span>().<span class="ident">expect</span>(<span class="string">&quot;metadata call failed&quot;</span>);
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;{:?}&quot;</span>, <span class="ident">metadata</span>.<span class="ident">file_type</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%3Apath%3A%3APath%3B%0A%0Alet%20path%20%3D%20Path%3A%3Anew(%22%2FMinas%2Ftirith%22)%3B%0Alet%20metadata%20%3D%20path.metadata().expect(%22metadata%20call%20failed%22)%3B%0Aprintln!(%22%7B%3A%3F%7D%22%2C%20metadata.file_type())%3B%0A%7D">Run</a></pre>
</div><h4 id='method.symlink_metadata' class="method"><span id='symlink_metadata.v' class='invisible'><code>pub fn <a href='#method.symlink_metadata' class='fnname'>symlink_metadata</a>(&amp;self) -&gt; <a class="type" href="../../std/io/type.Result.html" title="type std::io::Result">Result</a>&lt;<a class="struct" href="../../std/fs/struct.Metadata.html" title="struct std::fs::Metadata">Metadata</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.5.0'>1.5.0</div><a class='srclink' href='../../src/std/path.rs.html#2206-2208' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Queries the metadata about a file without following symlinks.</p>
<p>This is an alias to <a href="../fs/fn.symlink_metadata.html"><code>fs::symlink_metadata</code></a>.</p>
<h1 id="examples-29" class="section-header"><a href="#examples-29">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/Minas/tirith&quot;</span>);
<span class="kw">let</span> <span class="ident">metadata</span> <span class="op">=</span> <span class="ident">path</span>.<span class="ident">symlink_metadata</span>().<span class="ident">expect</span>(<span class="string">&quot;symlink_metadata call failed&quot;</span>);
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;{:?}&quot;</span>, <span class="ident">metadata</span>.<span class="ident">file_type</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%3Apath%3A%3APath%3B%0A%0Alet%20path%20%3D%20Path%3A%3Anew(%22%2FMinas%2Ftirith%22)%3B%0Alet%20metadata%20%3D%20path.symlink_metadata().expect(%22symlink_metadata%20call%20failed%22)%3B%0Aprintln!(%22%7B%3A%3F%7D%22%2C%20metadata.file_type())%3B%0A%7D">Run</a></pre>
</div><h4 id='method.canonicalize' class="method"><span id='canonicalize.v' class='invisible'><code>pub fn <a href='#method.canonicalize' class='fnname'>canonicalize</a>(&amp;self) -&gt; <a class="type" href="../../std/io/type.Result.html" title="type std::io::Result">Result</a>&lt;<a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.5.0'>1.5.0</div><a class='srclink' href='../../src/std/path.rs.html#2226-2228' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the canonical form of the path with all intermediate components
normalized and symbolic links resolved.</p>
<p>This is an alias to <a href="../fs/fn.canonicalize.html"><code>fs::canonicalize</code></a>.</p>
<h1 id="examples-30" class="section-header"><a href="#examples-30">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::{<span class="ident">Path</span>, <span class="ident">PathBuf</span>};

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/foo/test/../test/bar.rs&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">path</span>.<span class="ident">canonicalize</span>().<span class="ident">unwrap</span>(), <span class="ident">PathBuf</span>::<span class="ident">from</span>(<span class="string">&quot;/foo/test/bar.rs&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%3Apath%3A%3A%7BPath%2C%20PathBuf%7D%3B%0A%0Alet%20path%20%3D%20Path%3A%3Anew(%22%2Ffoo%2Ftest%2F..%2Ftest%2Fbar.rs%22)%3B%0Aassert_eq!(path.canonicalize().unwrap()%2C%20PathBuf%3A%3Afrom(%22%2Ffoo%2Ftest%2Fbar.rs%22))%3B%0A%7D">Run</a></pre>
</div><h4 id='method.read_link' class="method"><span id='read_link.v' class='invisible'><code>pub fn <a href='#method.read_link' class='fnname'>read_link</a>(&amp;self) -&gt; <a class="type" href="../../std/io/type.Result.html" title="type std::io::Result">Result</a>&lt;<a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.5.0'>1.5.0</div><a class='srclink' href='../../src/std/path.rs.html#2245-2247' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Reads a symbolic link, returning the file that the link points to.</p>
<p>This is an alias to <a href="../fs/fn.read_link.html"><code>fs::read_link</code></a>.</p>
<h1 id="examples-31" class="section-header"><a href="#examples-31">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/laputa/sky_castle.rs&quot;</span>);
<span class="kw">let</span> <span class="ident">path_link</span> <span class="op">=</span> <span class="ident">path</span>.<span class="ident">read_link</span>().<span class="ident">expect</span>(<span class="string">&quot;read_link call failed&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%3Apath%3A%3APath%3B%0A%0Alet%20path%20%3D%20Path%3A%3Anew(%22%2Flaputa%2Fsky_castle.rs%22)%3B%0Alet%20path_link%20%3D%20path.read_link().expect(%22read_link%20call%20failed%22)%3B%0A%7D">Run</a></pre>
</div><h4 id='method.read_dir' class="method"><span id='read_dir.v' class='invisible'><code>pub fn <a href='#method.read_dir' class='fnname'>read_dir</a>(&amp;self) -&gt; <a class="type" href="../../std/io/type.Result.html" title="type std::io::Result">Result</a>&lt;<a class="struct" href="../../std/fs/struct.ReadDir.html" title="struct std::fs::ReadDir">ReadDir</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.5.0'>1.5.0</div><a class='srclink' href='../../src/std/path.rs.html#2273-2275' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns an iterator over the entries within a directory.</p>
<p>The iterator will yield instances of <a href="../io/type.Result.html"><code>io::Result</code></a><code>&lt;</code><a href="../fs/struct.DirEntry.html"><code>DirEntry</code></a><code>&gt;</code>. New
errors may be encountered after an iterator is initially constructed.</p>
<p>This is an alias to <a href="../fs/fn.read_dir.html"><code>fs::read_dir</code></a>.</p>
<h1 id="examples-32" class="section-header"><a href="#examples-32">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;

<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;/laputa&quot;</span>);
<span class="kw">for</span> <span class="ident">entry</span> <span class="kw">in</span> <span class="ident">path</span>.<span class="ident">read_dir</span>().<span class="ident">expect</span>(<span class="string">&quot;read_dir call failed&quot;</span>) {
    <span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Ok</span>(<span class="ident">entry</span>) <span class="op">=</span> <span class="ident">entry</span> {
        <span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;{:?}&quot;</span>, <span class="ident">entry</span>.<span class="ident">path</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%3Apath%3A%3APath%3B%0A%0Alet%20path%20%3D%20Path%3A%3Anew(%22%2Flaputa%22)%3B%0Afor%20entry%20in%20path.read_dir().expect(%22read_dir%20call%20failed%22)%20%7B%0A%20%20%20%20if%20let%20Ok(entry)%20%3D%20entry%20%7B%0A%20%20%20%20%20%20%20%20println!(%22%7B%3A%3F%7D%22%2C%20entry.path())%3B%0A%20%20%20%20%7D%0A%7D%0A%7D">Run</a></pre>
</div><h4 id='method.exists' class="method"><span id='exists.v' class='invisible'><code>pub fn <a href='#method.exists' class='fnname'>exists</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.5.0'>1.5.0</div><a class='srclink' href='../../src/std/path.rs.html#2299-2301' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns whether the path points at an existing entity.</p>
<p>This function will traverse symbolic links to query information about the
destination file. In case of broken symbolic links this will return <code>false</code>.</p>
<p>If you cannot access the directory containing the file, e.g. because of a
permission error, this will return <code>false</code>.</p>
<h1 id="examples-33" class="section-header"><a href="#examples-33">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;does_not_exist.txt&quot;</span>).<span class="ident">exists</span>(), <span class="bool-val">false</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%3Apath%3A%3APath%3B%0Aassert_eq!(Path%3A%3Anew(%22does_not_exist.txt%22).exists()%2C%20false)%3B%0A%7D">Run</a></pre>
<h1 id="see-also" class="section-header"><a href="#see-also">See Also</a></h1>
<p>This is a convenience function that coerces errors to false. If you want to
check errors, call <a href="../../std/fs/fn.metadata.html">fs::metadata</a>.</p>
</div><h4 id='method.is_file' class="method"><span id='is_file.v' class='invisible'><code>pub fn <a href='#method.is_file' class='fnname'>is_file</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.5.0'>1.5.0</div><a class='srclink' href='../../src/std/path.rs.html#2328-2330' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns whether the path exists on disk and is pointing at a regular file.</p>
<p>This function will traverse symbolic links to query information about the
destination file. In case of broken symbolic links this will return <code>false</code>.</p>
<p>If you cannot access the directory containing the file, e.g. because of a
permission error, this will return <code>false</code>.</p>
<h1 id="examples-34" class="section-header"><a href="#examples-34">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;./is_a_directory/&quot;</span>).<span class="ident">is_file</span>(), <span class="bool-val">false</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;a_file.txt&quot;</span>).<span class="ident">is_file</span>(), <span class="bool-val">true</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%3Apath%3A%3APath%3B%0Aassert_eq!(Path%3A%3Anew(%22.%2Fis_a_directory%2F%22).is_file()%2C%20false)%3B%0Aassert_eq!(Path%3A%3Anew(%22a_file.txt%22).is_file()%2C%20true)%3B%0A%7D">Run</a></pre>
<h1 id="see-also-1" class="section-header"><a href="#see-also-1">See Also</a></h1>
<p>This is a convenience function that coerces errors to false. If you want to
check errors, call <a href="../../std/fs/fn.metadata.html">fs::metadata</a> and handle its Result. Then call
<a href="../../std/fs/struct.Metadata.html#method.is_file">fs::Metadata::is_file</a> if it was Ok.</p>
</div><h4 id='method.is_dir' class="method"><span id='is_dir.v' class='invisible'><code>pub fn <a href='#method.is_dir' class='fnname'>is_dir</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.5.0'>1.5.0</div><a class='srclink' href='../../src/std/path.rs.html#2357-2359' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns whether the path exists on disk and is pointing at a directory.</p>
<p>This function will traverse symbolic links to query information about the
destination file. In case of broken symbolic links this will return <code>false</code>.</p>
<p>If you cannot access the directory containing the file, e.g. because of a
permission error, this will return <code>false</code>.</p>
<h1 id="examples-35" class="section-header"><a href="#examples-35">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;./is_a_directory/&quot;</span>).<span class="ident">is_dir</span>(), <span class="bool-val">true</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">Path</span>::<span class="ident">new</span>(<span class="string">&quot;a_file.txt&quot;</span>).<span class="ident">is_dir</span>(), <span class="bool-val">false</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%3Apath%3A%3APath%3B%0Aassert_eq!(Path%3A%3Anew(%22.%2Fis_a_directory%2F%22).is_dir()%2C%20true)%3B%0Aassert_eq!(Path%3A%3Anew(%22a_file.txt%22).is_dir()%2C%20false)%3B%0A%7D">Run</a></pre>
<h1 id="see-also-2" class="section-header"><a href="#see-also-2">See Also</a></h1>
<p>This is a convenience function that coerces errors to false. If you want to
check errors, call <a href="../../std/fs/fn.metadata.html">fs::metadata</a> and handle its Result. Then call
<a href="../../std/fs/struct.Metadata.html#method.is_dir">fs::Metadata::is_dir</a> if it was Ok.</p>
</div></div>
            <h2 id='implementations' class='small-section-header'>
              Trait Implementations<a href='#implementations' class='anchor'></a>
            </h2>
        <h3 id='impl-Clone' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../std/clone/trait.Clone.html" title="trait std::clone::Clone">Clone</a> for <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-Clone' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1093' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><code>fn <a href='../../std/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1093' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='clone_from.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/clone.rs.html#112-114' title='goto source code'>[src]</a></span></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-From%3CBox%3CPath%3E%3E' class='impl'><span class='in-band'><code>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/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;&gt; for <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-From%3CBox%3CPath%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.18.0'>1.18.0</div><a class='srclink' href='../../src/std/path.rs.html#1359-1363' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from' class="method"><span id='from.v' class='invisible'><code>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/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;) -&gt; <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1360-1362' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CPathBuf%3E' class='impl'><span class='in-band'><code>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/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;<a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;</code><a href='#impl-From%3CPathBuf%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.20.0'>1.20.0</div><a class='srclink' href='../../src/std/path.rs.html#1366-1370' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from-1' 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;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><span id='from.v-1' class='invisible'><code>fn <a href='../../std/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(p: <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>) -&gt; <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;<a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1367-1369' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3C%26%27a%20T%3E' class='impl'><span class='in-band'><code>impl&lt;'a, 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 </a>T&gt; for <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-From%3C%26%27a%20T%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1373-1377' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from-2' class="method"><span id='from.v-2' class='invisible'><code>fn <a href='../../std/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(s: <a class="primitive" href="../primitive.reference.html">&amp;'a </a>T) -&gt; <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1374-1376' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3COsString%3E' class='impl'><span class='in-band'><code>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' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1380-1384' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from-3' class="method"><span id='from.v-3' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1381-1383' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CPathBuf%3E-1' class='impl'><span class='in-band'><code>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-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.14.0'>1.14.0</div><a class='srclink' href='../../src/std/path.rs.html#1387-1391' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from-4' class="method"><span id='from.v-4' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1388-1390' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CString%3E' class='impl'><span class='in-band'><code>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/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-From%3CString%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1394-1398' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from-5' class="method"><span id='from.v-5' class='invisible'><code>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/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1395-1397' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 id='impl-FromIterator%3CP%3E' class='impl'><span class='in-band'><code>impl&lt;P:&nbsp;<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;&gt; <a class="trait" href="../../std/iter/trait.FromIterator.html" title="trait std::iter::FromIterator">FromIterator</a>&lt;P&gt; for <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-FromIterator%3CP%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1401-1407' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from_iter' class="method"><span id='from_iter.v' class='invisible'><code>fn <a href='../../std/iter/trait.FromIterator.html#tymethod.from_iter' class='fnname'>from_iter</a>&lt;I:&nbsp;<a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = P&gt;&gt;(iter: I) -&gt; <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1402-1406' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates a value from an iterator. <a href="../../std/iter/trait.FromIterator.html#tymethod.from_iter">Read more</a></p>
</div></div><h3 id='impl-Extend%3CP%3E' class='impl'><span class='in-band'><code>impl&lt;P:&nbsp;<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;&gt; <a class="trait" href="../../std/iter/trait.Extend.html" title="trait std::iter::Extend">Extend</a>&lt;P&gt; for <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-Extend%3CP%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1410-1416' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.extend' class="method"><span id='extend.v' class='invisible'><code>fn <a href='../../std/iter/trait.Extend.html#tymethod.extend' class='fnname'>extend</a>&lt;I:&nbsp;<a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a>&lt;Item = P&gt;&gt;(&amp;mut self, iter: I)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1411-1415' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Extends a collection with the contents of an iterator. <a href="../../std/iter/trait.Extend.html#tymethod.extend">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../std/fmt/trait.Debug.html" title="trait std::fmt::Debug">Debug</a> for <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-Debug' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1419-1423' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><code>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="enum" href="../../std/result/enum.Result.html" title="enum std::result::Result">Result</a>&lt;<a class="primitive" href="../primitive.unit.html">()</a>, <a class="struct" href="../../std/fmt/struct.Error.html" title="struct std::fmt::Error">Error</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1420-1422' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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-Deref' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../std/ops/trait.Deref.html" title="trait std::ops::Deref">Deref</a> for <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-Deref' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1426-1432' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Target' class="type"><span id='Target.t' class='invisible'><code>type <a href='../../std/ops/trait.Deref.html#associatedtype.Target' class="type">Target</a> = <a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a></code></span></h4>
<div class='docblock'><p>The resulting type after dereferencing.</p>
</div><h4 id='method.deref' class="method"><span id='deref.v' class='invisible'><code>fn <a href='../../std/ops/trait.Deref.html#tymethod.deref' class='fnname'>deref</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1429-1431' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Dereferences the value.</p>
</div></div><h3 id='impl-Borrow%3CPath%3E' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../std/borrow/trait.Borrow.html" title="trait std::borrow::Borrow">Borrow</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/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-Borrow%3CPath%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1435-1439' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.borrow' class="method"><span id='borrow.v' class='invisible'><code>fn <a href='../../std/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1436-1438' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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-Default' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../std/default/trait.Default.html" title="trait std::default::Default">Default</a> for <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-Default' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.17.0'>1.17.0</div><a class='srclink' href='../../src/std/path.rs.html#1442-1446' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.default' class="method"><span id='default.v' class='invisible'><code>fn <a href='../../std/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1443-1445' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the &quot;default value&quot; for a type. <a href="../../std/default/trait.Default.html#tymethod.default">Read more</a></p>
</div></div><h3 id='impl-From%3CPathBuf%3E-2' class='impl'><span class='in-band'><code>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/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</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-From%3CPathBuf%3E-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.6.0'>1.6.0</div><a class='srclink' href='../../src/std/path.rs.html#1457-1462' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from-6' class="method"><span id='from.v-6' class='invisible'><code>fn <a href='../../std/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(s: <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</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/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1459-1461' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CPathBuf%3E-3' class='impl'><span class='in-band'><code>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/sync/struct.Arc.html" title="struct std::sync::Arc">Arc</a>&lt;<a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;</code><a href='#impl-From%3CPathBuf%3E-3' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.24.0'>1.24.0</div><a class='srclink' href='../../src/std/path.rs.html#1465-1471' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from-7' class="method"><span id='from.v-7' class='invisible'><code>fn <a href='../../std/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(s: <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>) -&gt; <a class="struct" href="../../std/sync/struct.Arc.html" title="struct std::sync::Arc">Arc</a>&lt;<a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1467-1470' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CPathBuf%3E-4' class='impl'><span class='in-band'><code>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/rc/struct.Rc.html" title="struct std::rc::Rc">Rc</a>&lt;<a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;</code><a href='#impl-From%3CPathBuf%3E-4' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.24.0'>1.24.0</div><a class='srclink' href='../../src/std/path.rs.html#1483-1489' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from-8' class="method"><span id='from.v-8' class='invisible'><code>fn <a href='../../std/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(s: <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>) -&gt; <a class="struct" href="../../std/rc/struct.Rc.html" title="struct std::rc::Rc">Rc</a>&lt;<a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1485-1488' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 id='impl-PartialEq' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../std/cmp/trait.PartialEq.html" title="trait std::cmp::PartialEq">PartialEq</a> for <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-PartialEq' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1512-1516' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq' class="method"><span id='eq.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1513-1515' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='ne.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-Hash' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../std/hash/trait.Hash.html" title="trait std::hash::Hash">Hash</a> for <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-Hash' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1519-1523' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.hash' class="method"><span id='hash.v' class='invisible'><code>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, h: <a class="primitive" href="../primitive.reference.html">&amp;mut </a>H)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1520-1522' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='hash_slice.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><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#202-208' title='goto source code'>[src]</a></span></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-Eq' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../std/cmp/trait.Eq.html" title="trait std::cmp::Eq">Eq</a> for <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-Eq' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1526' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div><h3 id='impl-PartialOrd' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../std/cmp/trait.PartialOrd.html" title="trait std::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-PartialOrd' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1529-1533' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp' class="method"><span id='partial_cmp.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1530-1532' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='lt.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#644-649' title='goto source code'>[src]</a></span></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' class="method"><span id='le.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#666-671' title='goto source code'>[src]</a></span></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' class="method"><span id='gt.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#687-692' title='goto source code'>[src]</a></span></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' class="method"><span id='ge.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#709-714' title='goto source code'>[src]</a></span></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-Ord' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../std/cmp/trait.Ord.html" title="trait std::cmp::Ord">Ord</a> for <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-Ord' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1536-1540' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.cmp' class="method"><span id='cmp.v' class='invisible'><code>fn <a href='../../std/cmp/trait.Ord.html#tymethod.cmp' class='fnname'>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/cmp/enum.Ordering.html" title="enum std::cmp::Ordering">Ordering</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1537-1539' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='max.v' class='invisible'><code>fn <a href='../../std/cmp/trait.Ord.html#method.max' class='fnname'>max</a>(self, other: Self) -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.21.0'>1.21.0</div><a class='srclink' href='../../src/core/cmp.rs.html#460-463' title='goto source code'>[src]</a></span></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"><span id='min.v' class='invisible'><code>fn <a href='../../std/cmp/trait.Ord.html#method.min' class='fnname'>min</a>(self, other: Self) -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.21.0'>1.21.0</div><a class='srclink' href='../../src/core/cmp.rs.html#476-479' title='goto source code'>[src]</a></span></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></div><h3 id='impl-AsRef%3COsStr%3E' class='impl'><span class='in-band'><code>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/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-AsRef%3COsStr%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1543-1547' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.as_ref' class="method"><span id='as_ref.v' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#1544-1546' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 id='impl-AsRef%3CPath%3E' class='impl'><span class='in-band'><code>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/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-AsRef%3CPath%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2503-2507' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.as_ref-1' class="method"><span id='as_ref.v-1' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2504-2506' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 id='impl-IntoIterator' class='impl'><span class='in-band'><code>impl&lt;'a&gt; <a class="trait" href="../../std/iter/trait.IntoIterator.html" title="trait std::iter::IntoIterator">IntoIterator</a> for &amp;'a <a class="struct" href="../../std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-IntoIterator' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.6.0'>1.6.0</div><a class='srclink' href='../../src/std/path.rs.html#2510-2514' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Item' class="type"><span id='Item.t' class='invisible'><code>type <a href='../../std/iter/trait.IntoIterator.html#associatedtype.Item' class="type">Item</a> = &amp;'a <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a></code></span></h4>
<div class='docblock'><p>The type of the elements being iterated over.</p>
</div><h4 id='associatedtype.IntoIter' class="type"><span id='IntoIter.t' class='invisible'><code>type <a href='../../std/iter/trait.IntoIterator.html#associatedtype.IntoIter' class="type">IntoIter</a> = <a class="struct" href="../../std/path/struct.Iter.html" title="struct std::path::Iter">Iter</a>&lt;'a&gt;</code></span></h4>
<div class='docblock'><p>Which kind of iterator are we turning this into?</p>
</div><h4 id='method.into_iter' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../std/path/struct.Iter.html" title="struct std::path::Iter">Iter</a>&lt;'a&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../std/path/struct.Iter.html" title="struct std::path::Iter">Iter</a>&lt;'a&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;'a&gt; <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a> for <a class="struct" href="../../std/path/struct.Iter.html" title="struct std::path::Iter">Iter</a>&lt;'a&gt;</span><span class="where fmt-newline">    type <a href='../../std/iter/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = &amp;'a <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a>;</span></code></div></div><span id='into_iter.v' class='invisible'><code>fn <a href='../../std/iter/trait.IntoIterator.html#tymethod.into_iter' class='fnname'>into_iter</a>(self) -&gt; <a class="struct" href="../../std/path/struct.Iter.html" title="struct std::path::Iter">Iter</a>&lt;'a&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2513' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates an iterator from a value. <a href="../../std/iter/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
</div></div><h3 id='impl-PartialEq%3CPath%3E' class='impl'><span class='in-band'><code>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/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-PartialEq%3CPath%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.6.0'>1.6.0</div><a class='srclink' href='../../src/std/path.rs.html#2526-2529' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq-1' class="method"><span id='eq.v-1' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2528' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='ne.v-1' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3CPathBuf%3E' class='impl'><span class='in-band'><code>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/path/struct.Path.html" title="struct std::path::Path">Path</a></code><a href='#impl-PartialEq%3CPathBuf%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.6.0'>1.6.0</div><a class='srclink' href='../../src/std/path.rs.html#2532-2535' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq-2' class="method"><span id='eq.v-2' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2534' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='ne.v-2' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialOrd%3CPath%3E' class='impl'><span class='in-band'><code>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/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-PartialOrd%3CPath%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2538-2543' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp-1' class="method"><span id='partial_cmp.v-1' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2540-2542' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='lt.v-1' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#644-649' title='goto source code'>[src]</a></span></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"><span id='le.v-1' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#666-671' title='goto source code'>[src]</a></span></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"><span id='gt.v-1' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#687-692' title='goto source code'>[src]</a></span></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"><span id='ge.v-1' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#709-714' title='goto source code'>[src]</a></span></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'><span class='in-band'><code>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/path/struct.Path.html" title="struct std::path::Path">Path</a></code><a href='#impl-PartialOrd%3CPathBuf%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2546-2551' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp-2' class="method"><span id='partial_cmp.v-2' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2548-2550' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='lt.v-2' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#644-649' title='goto source code'>[src]</a></span></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"><span id='le.v-2' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#666-671' title='goto source code'>[src]</a></span></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"><span id='gt.v-2' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#687-692' title='goto source code'>[src]</a></span></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"><span id='ge.v-2' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#709-714' title='goto source code'>[src]</a></span></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-PartialEq%3C%26%27a%20Path%3E' class='impl'><span class='in-band'><code>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/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-PartialEq%3C%26%27a%20Path%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.6.0'>1.6.0</div><a class='srclink' href='../../src/std/path.rs.html#2526-2529' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq-3' class="method"><span id='eq.v-3' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2528' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='ne.v-3' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3CPathBuf%3E-1' class='impl'><span class='in-band'><code>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 &amp;'a <a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a></code><a href='#impl-PartialEq%3CPathBuf%3E-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.6.0'>1.6.0</div><a class='srclink' href='../../src/std/path.rs.html#2532-2535' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq-4' class="method"><span id='eq.v-4' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2534' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='ne.v-4' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialOrd%3C%26%27a%20Path%3E' class='impl'><span class='in-band'><code>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/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-PartialOrd%3C%26%27a%20Path%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2538-2543' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp-3' class="method"><span id='partial_cmp.v-3' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2540-2542' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='lt.v-3' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#644-649' title='goto source code'>[src]</a></span></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"><span id='le.v-3' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#666-671' title='goto source code'>[src]</a></span></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"><span id='gt.v-3' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#687-692' title='goto source code'>[src]</a></span></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"><span id='ge.v-3' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#709-714' title='goto source code'>[src]</a></span></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-1' class='impl'><span class='in-band'><code>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 &amp;'a <a class="struct" href="../../std/path/struct.Path.html" title="struct std::path::Path">Path</a></code><a href='#impl-PartialOrd%3CPathBuf%3E-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2546-2551' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp-4' class="method"><span id='partial_cmp.v-4' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2548-2550' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='lt.v-4' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#644-649' title='goto source code'>[src]</a></span></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"><span id='le.v-4' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#666-671' title='goto source code'>[src]</a></span></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"><span id='gt.v-4' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#687-692' title='goto source code'>[src]</a></span></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"><span id='ge.v-4' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#709-714' title='goto source code'>[src]</a></span></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-PartialEq%3CPathBuf%3E-2' class='impl'><span class='in-band'><code>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="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%3CPathBuf%3E-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.6.0'>1.6.0</div><a class='srclink' href='../../src/std/path.rs.html#2526-2529' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq-5' class="method"><span id='eq.v-5' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2528' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='ne.v-5' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></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'><span class='in-band'><code>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/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-PartialEq%3CCow%3C%27a%2C%20Path%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.6.0'>1.6.0</div><a class='srclink' href='../../src/std/path.rs.html#2532-2535' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq-6' class="method"><span id='eq.v-6' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2534' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='ne.v-6' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialOrd%3CPathBuf%3E-2' class='impl'><span class='in-band'><code>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="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%3CPathBuf%3E-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2538-2543' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp-5' class="method"><span id='partial_cmp.v-5' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2540-2542' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='lt.v-5' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#644-649' title='goto source code'>[src]</a></span></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"><span id='le.v-5' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#666-671' title='goto source code'>[src]</a></span></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"><span id='gt.v-5' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#687-692' title='goto source code'>[src]</a></span></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"><span id='ge.v-5' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#709-714' title='goto source code'>[src]</a></span></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'><span class='in-band'><code>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/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-PartialOrd%3CCow%3C%27a%2C%20Path%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2546-2551' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp-6' class="method"><span id='partial_cmp.v-6' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2548-2550' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='lt.v-6' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#644-649' title='goto source code'>[src]</a></span></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"><span id='le.v-6' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#666-671' title='goto source code'>[src]</a></span></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"><span id='gt.v-6' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#687-692' title='goto source code'>[src]</a></span></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"><span id='ge.v-6' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#709-714' title='goto source code'>[src]</a></span></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-PartialEq%3COsStr%3E' class='impl'><span class='in-band'><code>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/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-PartialEq%3COsStr%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2564-2567' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq-7' class="method"><span id='eq.v-7' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2566' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='ne.v-7' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3CPathBuf%3E-3' class='impl'><span class='in-band'><code>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.OsStr.html" title="struct std::ffi::OsStr">OsStr</a></code><a href='#impl-PartialEq%3CPathBuf%3E-3' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2570-2573' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq-8' class="method"><span id='eq.v-8' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2572' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='ne.v-8' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialOrd%3COsStr%3E' class='impl'><span class='in-band'><code>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/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-PartialOrd%3COsStr%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2576-2581' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp-7' class="method"><span id='partial_cmp.v-7' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2578-2580' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='lt.v-7' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#644-649' title='goto source code'>[src]</a></span></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"><span id='le.v-7' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#666-671' title='goto source code'>[src]</a></span></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"><span id='gt.v-7' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#687-692' title='goto source code'>[src]</a></span></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"><span id='ge.v-7' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#709-714' title='goto source code'>[src]</a></span></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-3' class='impl'><span class='in-band'><code>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.OsStr.html" title="struct std::ffi::OsStr">OsStr</a></code><a href='#impl-PartialOrd%3CPathBuf%3E-3' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2584-2589' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp-8' class="method"><span id='partial_cmp.v-8' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2586-2588' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='lt.v-8' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#644-649' title='goto source code'>[src]</a></span></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"><span id='le.v-8' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#666-671' title='goto source code'>[src]</a></span></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"><span id='gt.v-8' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#687-692' title='goto source code'>[src]</a></span></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"><span id='ge.v-8' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#709-714' title='goto source code'>[src]</a></span></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-PartialEq%3C%26%27a%20OsStr%3E' class='impl'><span class='in-band'><code>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/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-PartialEq%3C%26%27a%20OsStr%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2564-2567' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq-9' class="method"><span id='eq.v-9' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2566' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='ne.v-9' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3CPathBuf%3E-4' class='impl'><span class='in-band'><code>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 &amp;'a <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a></code><a href='#impl-PartialEq%3CPathBuf%3E-4' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2570-2573' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq-10' class="method"><span id='eq.v-10' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2572' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='ne.v-10' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialOrd%3C%26%27a%20OsStr%3E' class='impl'><span class='in-band'><code>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/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-PartialOrd%3C%26%27a%20OsStr%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2576-2581' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp-9' class="method"><span id='partial_cmp.v-9' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2578-2580' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='lt.v-9' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#644-649' title='goto source code'>[src]</a></span></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"><span id='le.v-9' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#666-671' title='goto source code'>[src]</a></span></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"><span id='gt.v-9' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#687-692' title='goto source code'>[src]</a></span></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"><span id='ge.v-9' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#709-714' title='goto source code'>[src]</a></span></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-4' class='impl'><span class='in-band'><code>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 &amp;'a <a class="struct" href="../../std/ffi/struct.OsStr.html" title="struct std::ffi::OsStr">OsStr</a></code><a href='#impl-PartialOrd%3CPathBuf%3E-4' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2584-2589' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp-10' class="method"><span id='partial_cmp.v-10' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2586-2588' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='lt.v-10' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#644-649' title='goto source code'>[src]</a></span></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"><span id='le.v-10' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#666-671' title='goto source code'>[src]</a></span></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"><span id='gt.v-10' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#687-692' title='goto source code'>[src]</a></span></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"><span id='ge.v-10' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#709-714' title='goto source code'>[src]</a></span></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-PartialEq%3CCow%3C%27a%2C%20OsStr%3E%3E' class='impl'><span class='in-band'><code>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/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-PartialEq%3CCow%3C%27a%2C%20OsStr%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2564-2567' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq-11' class="method"><span id='eq.v-11' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2566' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='ne.v-11' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3CPathBuf%3E-5' class='impl'><span class='in-band'><code>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="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%3CPathBuf%3E-5' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2570-2573' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq-12' class="method"><span id='eq.v-12' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2572' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='ne.v-12' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialOrd%3CCow%3C%27a%2C%20OsStr%3E%3E' class='impl'><span class='in-band'><code>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/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a></code><a href='#impl-PartialOrd%3CCow%3C%27a%2C%20OsStr%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2576-2581' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp-11' class="method"><span id='partial_cmp.v-11' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2578-2580' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='lt.v-11' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#644-649' title='goto source code'>[src]</a></span></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"><span id='le.v-11' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#666-671' title='goto source code'>[src]</a></span></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"><span id='gt.v-11' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#687-692' title='goto source code'>[src]</a></span></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"><span id='ge.v-11' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#709-714' title='goto source code'>[src]</a></span></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-5' class='impl'><span class='in-band'><code>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="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%3CPathBuf%3E-5' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2584-2589' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp-12' class="method"><span id='partial_cmp.v-12' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2586-2588' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='lt.v-12' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#644-649' title='goto source code'>[src]</a></span></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"><span id='le.v-12' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#666-671' title='goto source code'>[src]</a></span></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"><span id='gt.v-12' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#687-692' title='goto source code'>[src]</a></span></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"><span id='ge.v-12' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#709-714' title='goto source code'>[src]</a></span></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-PartialEq%3COsString%3E' class='impl'><span class='in-band'><code>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' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2564-2567' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq-13' class="method"><span id='eq.v-13' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2566' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='ne.v-13' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialEq%3CPathBuf%3E-6' class='impl'><span class='in-band'><code>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-6' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2570-2573' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq-14' class="method"><span id='eq.v-14' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2572' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='ne.v-14' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialOrd%3COsString%3E' class='impl'><span class='in-band'><code>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' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2576-2581' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp-13' class="method"><span id='partial_cmp.v-13' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2578-2580' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='lt.v-13' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#644-649' title='goto source code'>[src]</a></span></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"><span id='le.v-13' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#666-671' title='goto source code'>[src]</a></span></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"><span id='gt.v-13' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#687-692' title='goto source code'>[src]</a></span></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"><span id='ge.v-13' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#709-714' title='goto source code'>[src]</a></span></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-6' class='impl'><span class='in-band'><code>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-6' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../src/std/path.rs.html#2584-2589' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp-14' class="method"><span id='partial_cmp.v-14' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/path.rs.html#2586-2588' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='lt.v-14' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#644-649' title='goto source code'>[src]</a></span></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"><span id='le.v-14' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#666-671' title='goto source code'>[src]</a></span></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"><span id='gt.v-14' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#687-692' title='goto source code'>[src]</a></span></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"><span id='ge.v-14' class='invisible'><code>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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/cmp.rs.html#709-714' title='goto source code'>[src]</a></span></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></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>
            </div>
        </div>
    </aside>

    

    <script>
        window.rootPath = "../../";
        window.currentCrate = "std";
    </script>
    <script src="../../main.js"></script>
    <script defer src="../../search-index.js"></script>
</body>
</html>