Sophie

Sophie

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

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 `Neg` trait in crate `std`.">
    <meta name="keywords" content="rust, rustlang, rust-lang, Neg">

    <title>std::ops::Neg - 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 trait">
    <!--[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'>Trait Neg</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#associated-types">Associated Types</a><div class="sidebar-links"><a href="#associatedtype.Output">Output</a></div><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.neg">neg</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../index.html'>std</a>::<wbr><a href='index.html'>ops</a></p><script>window.sidebarCurrent = {name: 'Neg', ty: 'trait', 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'>Trait <a href='../index.html'>std</a>::<wbr><a href='index.html'>ops</a>::<wbr><a class="trait" href=''>Neg</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/core/ops/arith.rs.html#592-600' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'><div class="docblock attributes">#[lang = "neg"]
</div>pub trait Neg {
    type <a href='#associatedtype.Output' class="type">Output</a>;
    fn <a href='#tymethod.neg' class='fnname'>neg</a>(self) -&gt; Self::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;
}</pre><div class='docblock'><p>The unary negation operator <code>-</code>.</p>
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
<p>An implementation of <code>Neg</code> for <code>Sign</code>, which allows the use of <code>-</code> to
negate its value.</p>

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

<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">PartialEq</span>)]</span>
<span class="kw">enum</span> <span class="ident">Sign</span> {
    <span class="ident">Negative</span>,
    <span class="ident">Zero</span>,
    <span class="ident">Positive</span>,
}

<span class="kw">impl</span> <span class="ident">Neg</span> <span class="kw">for</span> <span class="ident">Sign</span> {
    <span class="kw">type</span> <span class="ident">Output</span> <span class="op">=</span> <span class="ident">Sign</span>;

    <span class="kw">fn</span> <span class="ident">neg</span>(<span class="self">self</span>) <span class="op">-&gt;</span> <span class="ident">Sign</span> {
        <span class="kw">match</span> <span class="self">self</span> {
            <span class="ident">Sign</span>::<span class="ident">Negative</span> <span class="op">=&gt;</span> <span class="ident">Sign</span>::<span class="ident">Positive</span>,
            <span class="ident">Sign</span>::<span class="ident">Zero</span> <span class="op">=&gt;</span> <span class="ident">Sign</span>::<span class="ident">Zero</span>,
            <span class="ident">Sign</span>::<span class="ident">Positive</span> <span class="op">=&gt;</span> <span class="ident">Sign</span>::<span class="ident">Negative</span>,
        }
    }
}

<span class="comment">// A negative positive is a negative.</span>
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="op">-</span><span class="ident">Sign</span>::<span class="ident">Positive</span>, <span class="ident">Sign</span>::<span class="ident">Negative</span>);
<span class="comment">// A double negative is a positive.</span>
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="op">-</span><span class="ident">Sign</span>::<span class="ident">Negative</span>, <span class="ident">Sign</span>::<span class="ident">Positive</span>);
<span class="comment">// Zero is its own negation.</span>
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="op">-</span><span class="ident">Sign</span>::<span class="ident">Zero</span>, <span class="ident">Sign</span>::<span class="ident">Zero</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%3Aops%3A%3ANeg%3B%0A%0A%23%5Bderive(Debug%2C%20PartialEq)%5D%0Aenum%20Sign%20%7B%0A%20%20%20%20Negative%2C%0A%20%20%20%20Zero%2C%0A%20%20%20%20Positive%2C%0A%7D%0A%0Aimpl%20Neg%20for%20Sign%20%7B%0A%20%20%20%20type%20Output%20%3D%20Sign%3B%0A%0A%20%20%20%20fn%20neg(self)%20-%3E%20Sign%20%7B%0A%20%20%20%20%20%20%20%20match%20self%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20Sign%3A%3ANegative%20%3D%3E%20Sign%3A%3APositive%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20Sign%3A%3AZero%20%3D%3E%20Sign%3A%3AZero%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20Sign%3A%3APositive%20%3D%3E%20Sign%3A%3ANegative%2C%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%7D%0A%0A%2F%2F%20A%20negative%20positive%20is%20a%20negative.%0Aassert_eq!(-Sign%3A%3APositive%2C%20Sign%3A%3ANegative)%3B%0A%2F%2F%20A%20double%20negative%20is%20a%20positive.%0Aassert_eq!(-Sign%3A%3ANegative%2C%20Sign%3A%3APositive)%3B%0A%2F%2F%20Zero%20is%20its%20own%20negation.%0Aassert_eq!(-Sign%3A%3AZero%2C%20Sign%3A%3AZero)%3B%0A%7D">Run</a></pre>
</div>
            <h2 id='associated-types' class='small-section-header'>
              Associated Types<a href='#associated-types' class='anchor'></a>
            </h2>
            <div class='methods'>
        <h3 id='associatedtype.Output' class='method'><span id='Output.t' class='invisible'><code>type <a href='#associatedtype.Output' class="type">Output</a></code></span></h3><div class='docblock'><p>The resulting type after applying the <code>-</code> operator.</p>
</div></div>
            <h2 id='required-methods' class='small-section-header'>
              Required Methods<a href='#required-methods' class='anchor'></a>
            </h2>
            <div class='methods'>
        <h3 id='tymethod.neg' class='method'><span id='neg.v' class='invisible'><code>fn <a href='#tymethod.neg' class='fnname'>neg</a>(self) -&gt; Self::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a></code></span></h3><div class='docblock'><p>Performs the unary <code>-</code> operation.</p>
</div></div>
        <h2 id='implementors' class='small-section-header'>
          Implementors<a href='#implementors' class='anchor'></a>
        </h2>
        <ul class='item-list' id='implementors-list'>
    <li><div class='out-of-band'><a class='srclink' href='../../src/core/num/wrapping.rs.html#311-317' title='goto source code'>[src]</a></div><code>impl Neg for <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i32.html">i32</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i32.html">i32</a>&gt;;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/num/wrapping.rs.html#311-317' title='goto source code'>[src]</a></div><code>impl Neg for <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u8.html">u8</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u8.html">u8</a>&gt;;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="primitive" href="../primitive.i128.html">i128</a><span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="primitive" href="../primitive.i128.html">i128</a> as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="primitive" href="../primitive.f32.html">f32</a><span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="primitive" href="../primitive.f32.html">f32</a> as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i32.html">i32</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i32.html">i32</a>&gt; as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/num/wrapping.rs.html#311-317' title='goto source code'>[src]</a></div><code>impl Neg for <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i64.html">i64</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i64.html">i64</a>&gt;;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.usize.html">usize</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.usize.html">usize</a>&gt; as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="primitive" href="../primitive.i32.html">i32</a><span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="primitive" href="../primitive.i32.html">i32</a> as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ops/arith.rs.html#607-613' title='goto source code'>[src]</a></div><code>impl Neg for <a class="primitive" href="../primitive.i32.html">i32</a><span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="primitive" href="../primitive.i32.html">i32</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="primitive" href="../primitive.i8.html">i8</a><span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="primitive" href="../primitive.i8.html">i8</a> as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ops/arith.rs.html#607-613' title='goto source code'>[src]</a></div><code>impl Neg for <a class="primitive" href="../primitive.i16.html">i16</a><span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="primitive" href="../primitive.i16.html">i16</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i16.html">i16</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i16.html">i16</a>&gt; as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ops/arith.rs.html#607-613' title='goto source code'>[src]</a></div><code>impl Neg for <a class="primitive" href="../primitive.i64.html">i64</a><span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="primitive" href="../primitive.i64.html">i64</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="primitive" href="../primitive.i16.html">i16</a><span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="primitive" href="../primitive.i16.html">i16</a> as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/num/wrapping.rs.html#311-317' title='goto source code'>[src]</a></div><code>impl Neg for <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.isize.html">isize</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.isize.html">isize</a>&gt;;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/num/wrapping.rs.html#311-317' title='goto source code'>[src]</a></div><code>impl Neg for <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i128.html">i128</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i128.html">i128</a>&gt;;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u8.html">u8</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u8.html">u8</a>&gt; as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/num/wrapping.rs.html#311-317' title='goto source code'>[src]</a></div><code>impl Neg for <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u16.html">u16</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u16.html">u16</a>&gt;;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i64.html">i64</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i64.html">i64</a>&gt; as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ops/arith.rs.html#607-613' title='goto source code'>[src]</a></div><code>impl Neg for <a class="primitive" href="../primitive.f32.html">f32</a><span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="primitive" href="../primitive.f32.html">f32</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/num/wrapping.rs.html#311-317' title='goto source code'>[src]</a></div><code>impl Neg for <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u64.html">u64</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u64.html">u64</a>&gt;;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ops/arith.rs.html#607-613' title='goto source code'>[src]</a></div><code>impl Neg for <a class="primitive" href="../primitive.i8.html">i8</a><span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="primitive" href="../primitive.i8.html">i8</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u32.html">u32</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u32.html">u32</a>&gt; as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.isize.html">isize</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.isize.html">isize</a>&gt; as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i8.html">i8</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i8.html">i8</a>&gt; as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/num/wrapping.rs.html#311-317' title='goto source code'>[src]</a></div><code>impl Neg for <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u128.html">u128</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u128.html">u128</a>&gt;;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i128.html">i128</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i128.html">i128</a>&gt; as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="primitive" href="../primitive.isize.html">isize</a><span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="primitive" href="../primitive.isize.html">isize</a> as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ops/arith.rs.html#607-613' title='goto source code'>[src]</a></div><code>impl Neg for <a class="primitive" href="../primitive.i128.html">i128</a><span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="primitive" href="../primitive.i128.html">i128</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u128.html">u128</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u128.html">u128</a>&gt; as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/num/wrapping.rs.html#311-317' title='goto source code'>[src]</a></div><code>impl Neg for <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i8.html">i8</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i8.html">i8</a>&gt;;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="primitive" href="../primitive.i64.html">i64</a><span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="primitive" href="../primitive.i64.html">i64</a> as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u16.html">u16</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u16.html">u16</a>&gt; as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ops/arith.rs.html#607-613' title='goto source code'>[src]</a></div><code>impl Neg for <a class="primitive" href="../primitive.isize.html">isize</a><span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="primitive" href="../primitive.isize.html">isize</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/num/wrapping.rs.html#311-317' title='goto source code'>[src]</a></div><code>impl Neg for <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i16.html">i16</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.i16.html">i16</a>&gt;;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u64.html">u64</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u64.html">u64</a>&gt; as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/internal_macros.rs.html#21-28' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Neg for &amp;'a <a class="primitive" href="../primitive.f64.html">f64</a><span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = &lt;<a class="primitive" href="../primitive.f64.html">f64</a> as <a class="trait" href="../../std/ops/trait.Neg.html" title="trait std::ops::Neg">Neg</a>&gt;::<a class="type" href="../../std/ops/trait.Neg.html#associatedtype.Output" title="type std::ops::Neg::Output">Output</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ops/arith.rs.html#607-613' title='goto source code'>[src]</a></div><code>impl Neg for <a class="primitive" href="../primitive.f64.html">f64</a><span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="primitive" href="../primitive.f64.html">f64</a>;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/num/wrapping.rs.html#311-317' title='goto source code'>[src]</a></div><code>impl Neg for <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.usize.html">usize</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.usize.html">usize</a>&gt;;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/num/wrapping.rs.html#311-317' title='goto source code'>[src]</a></div><code>impl Neg for <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u32.html">u32</a>&gt;<span class="where fmt-newline">  type <a href='#associatedtype.Output' class="type">Output</a> = <a class="struct" href="../../std/num/struct.Wrapping.html" title="struct std::num::Wrapping">Wrapping</a>&lt;<a class="primitive" href="../primitive.u32.html">u32</a>&gt;;</span></code></li>
</ul><script type="text/javascript" async
                         src="../../implementors/core/ops/arith/trait.Neg.js">
                 </script></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>