Sophie

Sophie

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

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

    <title>std::heap::Heap - 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 Heap</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Copy">Copy</a><a href="#impl-Clone">Clone</a><a href="#impl-Alloc">Alloc</a><a href="#impl-Default">Default</a><a href="#impl-Debug">Debug</a></div></div><p class='location'><a href='../index.html'>std</a>::<wbr><a href='index.html'>heap</a></p><script>window.sidebarCurrent = {name: 'Heap', 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'>heap</a>::<wbr><a class="struct" href=''>Heap</a></span><span class='out-of-band'><span class='since' title='Stable since Rust version '></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/alloc/heap.rs.html#78' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct Heap;</pre><div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>allocator_api </code><a href="https://github.com/rust-lang/rust/issues/32838">#32838</a>)</summary><p>the precise API and guarantees it provides may be tweaked slightly, especially to possibly take into account the types being stored to make room for a future tracing garbage collector</p>
</details></div></div>
            <h2 id='implementations' class='small-section-header'>
              Trait Implementations<a href='#implementations' class='anchor'></a>
            </h2>
        <h3 id='impl-Copy' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../std/marker/trait.Copy.html" title="trait std::marker::Copy">Copy</a> for <a class="struct" href="../../std/heap/struct.Heap.html" title="struct std::heap::Heap">Heap</a></code><a href='#impl-Copy' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/heap.rs.html#77' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div><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/heap/struct.Heap.html" title="struct std::heap::Heap">Heap</a></code><a href='#impl-Clone' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/heap.rs.html#77' 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/heap/struct.Heap.html" title="struct std::heap::Heap">Heap</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/heap.rs.html#77' 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><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</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-Alloc' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../std/heap/trait.Alloc.html" title="trait std::heap::Alloc">Alloc</a> for <a class="struct" href="../../std/heap/struct.Heap.html" title="struct std::heap::Heap">Heap</a></code><a href='#impl-Alloc' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/heap.rs.html#80-229' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.alloc' class="method"><span id='alloc.v' class='invisible'><code>unsafe fn <a href='../../std/heap/trait.Alloc.html#tymethod.alloc' class='fnname'>alloc</a>(&amp;mut self, layout: <a class="struct" href="../../std/heap/struct.Layout.html" title="struct std::heap::Layout">Layout</a>) -&gt; <a class="enum" href="../../std/result/enum.Result.html" title="enum std::result::Result">Result</a>&lt;<a class="primitive" href="../primitive.pointer.html">*mut </a><a class="primitive" href="../primitive.u8.html">u8</a>, <a class="enum" href="../../std/heap/enum.AllocErr.html" title="enum std::heap::AllocErr">AllocErr</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/heap.rs.html#82-92' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>allocator_api </code><a href="https://github.com/rust-lang/rust/issues/32838">#32838</a>)</summary><p>the precise API and guarantees it provides may be tweaked slightly, especially to possibly take into account the types being stored to make room for a future tracing garbage collector</p>
</details></div></div><div class='docblock'><p>Returns a pointer meeting the size and alignment guarantees of <code>layout</code>. <a href="../../std/heap/trait.Alloc.html#tymethod.alloc">Read more</a></p>
</div><h4 id='method.oom' class="method"><span id='oom.v' class='invisible'><code>fn <a href='../../std/heap/trait.Alloc.html#method.oom' class='fnname'>oom</a>(&amp;mut self, err: <a class="enum" href="../../std/heap/enum.AllocErr.html" title="enum std::heap::AllocErr">AllocErr</a>) -&gt; <a class="primitive" href="../primitive.never.html">!</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/heap.rs.html#96-100' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>allocator_api </code><a href="https://github.com/rust-lang/rust/issues/32838">#32838</a>)</summary><p>the precise API and guarantees it provides may be tweaked slightly, especially to possibly take into account the types being stored to make room for a future tracing garbage collector</p>
</details></div></div><div class='docblock'><p>Allocator-specific method for signaling an out-of-memory condition. <a href="../../std/heap/trait.Alloc.html#method.oom">Read more</a></p>
</div><h4 id='method.dealloc' class="method"><span id='dealloc.v' class='invisible'><code>unsafe fn <a href='../../std/heap/trait.Alloc.html#tymethod.dealloc' class='fnname'>dealloc</a>(&amp;mut self, ptr: <a class="primitive" href="../primitive.pointer.html">*mut </a><a class="primitive" href="../primitive.u8.html">u8</a>, layout: <a class="struct" href="../../std/heap/struct.Layout.html" title="struct std::heap::Layout">Layout</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/heap.rs.html#103-105' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>allocator_api </code><a href="https://github.com/rust-lang/rust/issues/32838">#32838</a>)</summary><p>the precise API and guarantees it provides may be tweaked slightly, especially to possibly take into account the types being stored to make room for a future tracing garbage collector</p>
</details></div></div><div class='docblock'><p>Deallocate the memory referenced by <code>ptr</code>. <a href="../../std/heap/trait.Alloc.html#tymethod.dealloc">Read more</a></p>
</div><h4 id='method.usable_size' class="method"><span id='usable_size.v' class='invisible'><code>fn <a href='../../std/heap/trait.Alloc.html#method.usable_size' class='fnname'>usable_size</a>(&amp;self, layout: &amp;<a class="struct" href="../../std/heap/struct.Layout.html" title="struct std::heap::Layout">Layout</a>) -&gt; <a class="primitive" href="../primitive.tuple.html">(</a><a class="primitive" href="../primitive.usize.html">usize</a>, <a class="primitive" href="../primitive.usize.html">usize</a><a class="primitive" href="../primitive.tuple.html">)</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/heap.rs.html#108-117' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>allocator_api </code><a href="https://github.com/rust-lang/rust/issues/32838">#32838</a>)</summary><p>the precise API and guarantees it provides may be tweaked slightly, especially to possibly take into account the types being stored to make room for a future tracing garbage collector</p>
</details></div></div><div class='docblock'><p>Returns bounds on the guaranteed usable size of a successful allocation created with the specified <code>layout</code>. <a href="../../std/heap/trait.Alloc.html#method.usable_size">Read more</a></p>
</div><h4 id='method.realloc' class="method"><span id='realloc.v' class='invisible'><code>unsafe fn <a href='../../std/heap/trait.Alloc.html#method.realloc' class='fnname'>realloc</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ptr: <a class="primitive" href="../primitive.pointer.html">*mut </a><a class="primitive" href="../primitive.u8.html">u8</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;layout: <a class="struct" href="../../std/heap/struct.Layout.html" title="struct std::heap::Layout">Layout</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;new_layout: <a class="struct" href="../../std/heap/struct.Layout.html" title="struct std::heap::Layout">Layout</a><br>) -&gt; <a class="enum" href="../../std/result/enum.Result.html" title="enum std::result::Result">Result</a>&lt;<a class="primitive" href="../primitive.pointer.html">*mut </a><a class="primitive" href="../primitive.u8.html">u8</a>, <a class="enum" href="../../std/heap/enum.AllocErr.html" title="enum std::heap::AllocErr">AllocErr</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/heap.rs.html#120-139' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>allocator_api </code><a href="https://github.com/rust-lang/rust/issues/32838">#32838</a>)</summary><p>the precise API and guarantees it provides may be tweaked slightly, especially to possibly take into account the types being stored to make room for a future tracing garbage collector</p>
</details></div></div><div class='docblock'><p>Returns a pointer suitable for holding data described by <code>new_layout</code>, meeting its size and alignment guarantees. To accomplish this, this may extend or shrink the allocation referenced by <code>ptr</code> to fit <code>new_layout</code>. <a href="../../std/heap/trait.Alloc.html#method.realloc">Read more</a></p>
</div><h4 id='method.alloc_zeroed' class="method"><span id='alloc_zeroed.v' class='invisible'><code>unsafe fn <a href='../../std/heap/trait.Alloc.html#method.alloc_zeroed' class='fnname'>alloc_zeroed</a>(&amp;mut self, layout: <a class="struct" href="../../std/heap/struct.Layout.html" title="struct std::heap::Layout">Layout</a>) -&gt; <a class="enum" href="../../std/result/enum.Result.html" title="enum std::result::Result">Result</a>&lt;<a class="primitive" href="../primitive.pointer.html">*mut </a><a class="primitive" href="../primitive.u8.html">u8</a>, <a class="enum" href="../../std/heap/enum.AllocErr.html" title="enum std::heap::AllocErr">AllocErr</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/heap.rs.html#142-152' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>allocator_api </code><a href="https://github.com/rust-lang/rust/issues/32838">#32838</a>)</summary><p>the precise API and guarantees it provides may be tweaked slightly, especially to possibly take into account the types being stored to make room for a future tracing garbage collector</p>
</details></div></div><div class='docblock'><p>Behaves like <code>alloc</code>, but also ensures that the contents are set to zero before being returned. <a href="../../std/heap/trait.Alloc.html#method.alloc_zeroed">Read more</a></p>
</div><h4 id='method.alloc_excess' class="method"><span id='alloc_excess.v' class='invisible'><code>unsafe fn <a href='../../std/heap/trait.Alloc.html#method.alloc_excess' class='fnname'>alloc_excess</a>(&amp;mut self, layout: <a class="struct" href="../../std/heap/struct.Layout.html" title="struct std::heap::Layout">Layout</a>) -&gt; <a class="enum" href="../../std/result/enum.Result.html" title="enum std::result::Result">Result</a>&lt;<a class="struct" href="../../std/heap/struct.Excess.html" title="struct std::heap::Excess">Excess</a>, <a class="enum" href="../../std/heap/enum.AllocErr.html" title="enum std::heap::AllocErr">AllocErr</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/heap.rs.html#155-167' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>allocator_api </code><a href="https://github.com/rust-lang/rust/issues/32838">#32838</a>)</summary><p>the precise API and guarantees it provides may be tweaked slightly, especially to possibly take into account the types being stored to make room for a future tracing garbage collector</p>
</details></div></div><div class='docblock'><p>Behaves like <code>alloc</code>, but also returns the whole size of the returned block. For some <code>layout</code> inputs, like arrays, this may include extra storage usable for additional data. <a href="../../std/heap/trait.Alloc.html#method.alloc_excess">Read more</a></p>
</div><h4 id='method.realloc_excess' class="method"><span id='realloc_excess.v' class='invisible'><code>unsafe fn <a href='../../std/heap/trait.Alloc.html#method.realloc_excess' class='fnname'>realloc_excess</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ptr: <a class="primitive" href="../primitive.pointer.html">*mut </a><a class="primitive" href="../primitive.u8.html">u8</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;layout: <a class="struct" href="../../std/heap/struct.Layout.html" title="struct std::heap::Layout">Layout</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;new_layout: <a class="struct" href="../../std/heap/struct.Layout.html" title="struct std::heap::Layout">Layout</a><br>) -&gt; <a class="enum" href="../../std/result/enum.Result.html" title="enum std::result::Result">Result</a>&lt;<a class="struct" href="../../std/heap/struct.Excess.html" title="struct std::heap::Excess">Excess</a>, <a class="enum" href="../../std/heap/enum.AllocErr.html" title="enum std::heap::AllocErr">AllocErr</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/heap.rs.html#170-188' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>allocator_api </code><a href="https://github.com/rust-lang/rust/issues/32838">#32838</a>)</summary><p>the precise API and guarantees it provides may be tweaked slightly, especially to possibly take into account the types being stored to make room for a future tracing garbage collector</p>
</details></div></div><div class='docblock'><p>Behaves like <code>realloc</code>, but also returns the whole size of the returned block. For some <code>layout</code> inputs, like arrays, this may include extra storage usable for additional data. <a href="../../std/heap/trait.Alloc.html#method.realloc_excess">Read more</a></p>
</div><h4 id='method.grow_in_place' class="method"><span id='grow_in_place.v' class='invisible'><code>unsafe fn <a href='../../std/heap/trait.Alloc.html#method.grow_in_place' class='fnname'>grow_in_place</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ptr: <a class="primitive" href="../primitive.pointer.html">*mut </a><a class="primitive" href="../primitive.u8.html">u8</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;layout: <a class="struct" href="../../std/heap/struct.Layout.html" title="struct std::heap::Layout">Layout</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;new_layout: <a class="struct" href="../../std/heap/struct.Layout.html" title="struct std::heap::Layout">Layout</a><br>) -&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/heap/struct.CannotReallocInPlace.html" title="struct std::heap::CannotReallocInPlace">CannotReallocInPlace</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/heap.rs.html#191-209' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>allocator_api </code><a href="https://github.com/rust-lang/rust/issues/32838">#32838</a>)</summary><p>the precise API and guarantees it provides may be tweaked slightly, especially to possibly take into account the types being stored to make room for a future tracing garbage collector</p>
</details></div></div><div class='docblock'><p>Attempts to extend the allocation referenced by <code>ptr</code> to fit <code>new_layout</code>. <a href="../../std/heap/trait.Alloc.html#method.grow_in_place">Read more</a></p>
</div><h4 id='method.shrink_in_place' class="method"><span id='shrink_in_place.v' class='invisible'><code>unsafe fn <a href='../../std/heap/trait.Alloc.html#method.shrink_in_place' class='fnname'>shrink_in_place</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ptr: <a class="primitive" href="../primitive.pointer.html">*mut </a><a class="primitive" href="../primitive.u8.html">u8</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;layout: <a class="struct" href="../../std/heap/struct.Layout.html" title="struct std::heap::Layout">Layout</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;new_layout: <a class="struct" href="../../std/heap/struct.Layout.html" title="struct std::heap::Layout">Layout</a><br>) -&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/heap/struct.CannotReallocInPlace.html" title="struct std::heap::CannotReallocInPlace">CannotReallocInPlace</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/heap.rs.html#212-228' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>allocator_api </code><a href="https://github.com/rust-lang/rust/issues/32838">#32838</a>)</summary><p>the precise API and guarantees it provides may be tweaked slightly, especially to possibly take into account the types being stored to make room for a future tracing garbage collector</p>
</details></div></div><div class='docblock'><p>Attempts to shrink the allocation referenced by <code>ptr</code> to fit <code>new_layout</code>. <a href="../../std/heap/trait.Alloc.html#method.shrink_in_place">Read more</a></p>
</div><h4 id='method.alloc_one' class="method"><span id='alloc_one.v' class='invisible'><code>fn <a href='../../std/heap/trait.Alloc.html#method.alloc_one' class='fnname'>alloc_one</a>&lt;T&gt;(&amp;mut self) -&gt; <a class="enum" href="../../std/result/enum.Result.html" title="enum std::result::Result">Result</a>&lt;<a class="struct" href="../../std/ptr/struct.NonNull.html" title="struct std::ptr::NonNull">NonNull</a>&lt;T&gt;, <a class="enum" href="../../std/heap/enum.AllocErr.html" title="enum std::heap::AllocErr">AllocErr</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/allocator.rs.html#898-907' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>allocator_api </code><a href="https://github.com/rust-lang/rust/issues/32838">#32838</a>)</summary><p>the precise API and guarantees it provides may be tweaked slightly, especially to possibly take into account the types being stored to make room for a future tracing garbage collector</p>
</details></div></div><div class='docblock'><p>Allocates a block suitable for holding an instance of <code>T</code>. <a href="../../std/heap/trait.Alloc.html#method.alloc_one">Read more</a></p>
</div><h4 id='method.dealloc_one' class="method"><span id='dealloc_one.v' class='invisible'><code>unsafe fn <a href='../../std/heap/trait.Alloc.html#method.dealloc_one' class='fnname'>dealloc_one</a>&lt;T&gt;(&amp;mut self, ptr: <a class="struct" href="../../std/ptr/struct.NonNull.html" title="struct std::ptr::NonNull">NonNull</a>&lt;T&gt;)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/allocator.rs.html#926-934' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>allocator_api </code><a href="https://github.com/rust-lang/rust/issues/32838">#32838</a>)</summary><p>the precise API and guarantees it provides may be tweaked slightly, especially to possibly take into account the types being stored to make room for a future tracing garbage collector</p>
</details></div></div><div class='docblock'><p>Deallocates a block suitable for holding an instance of <code>T</code>. <a href="../../std/heap/trait.Alloc.html#method.dealloc_one">Read more</a></p>
</div><h4 id='method.alloc_array' class="method"><span id='alloc_array.v' class='invisible'><code>fn <a href='../../std/heap/trait.Alloc.html#method.alloc_array' class='fnname'>alloc_array</a>&lt;T&gt;(&amp;mut self, n: <a class="primitive" href="../primitive.usize.html">usize</a>) -&gt; <a class="enum" href="../../std/result/enum.Result.html" title="enum std::result::Result">Result</a>&lt;<a class="struct" href="../../std/ptr/struct.NonNull.html" title="struct std::ptr::NonNull">NonNull</a>&lt;T&gt;, <a class="enum" href="../../std/heap/enum.AllocErr.html" title="enum std::heap::AllocErr">AllocErr</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/allocator.rs.html#966-980' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>allocator_api </code><a href="https://github.com/rust-lang/rust/issues/32838">#32838</a>)</summary><p>the precise API and guarantees it provides may be tweaked slightly, especially to possibly take into account the types being stored to make room for a future tracing garbage collector</p>
</details></div></div><div class='docblock'><p>Allocates a block suitable for holding <code>n</code> instances of <code>T</code>. <a href="../../std/heap/trait.Alloc.html#method.alloc_array">Read more</a></p>
</div><h4 id='method.realloc_array' class="method"><span id='realloc_array.v' class='invisible'><code>unsafe fn <a href='../../std/heap/trait.Alloc.html#method.realloc_array' class='fnname'>realloc_array</a>&lt;T&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ptr: <a class="struct" href="../../std/ptr/struct.NonNull.html" title="struct std::ptr::NonNull">NonNull</a>&lt;T&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;n_old: <a class="primitive" href="../primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;n_new: <a class="primitive" href="../primitive.usize.html">usize</a><br>) -&gt; <a class="enum" href="../../std/result/enum.Result.html" title="enum std::result::Result">Result</a>&lt;<a class="struct" href="../../std/ptr/struct.NonNull.html" title="struct std::ptr::NonNull">NonNull</a>&lt;T&gt;, <a class="enum" href="../../std/heap/enum.AllocErr.html" title="enum std::heap::AllocErr">AllocErr</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/allocator.rs.html#1014-1029' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>allocator_api </code><a href="https://github.com/rust-lang/rust/issues/32838">#32838</a>)</summary><p>the precise API and guarantees it provides may be tweaked slightly, especially to possibly take into account the types being stored to make room for a future tracing garbage collector</p>
</details></div></div><div class='docblock'><p>Reallocates a block previously suitable for holding <code>n_old</code> instances of <code>T</code>, returning a block suitable for holding <code>n_new</code> instances of <code>T</code>. <a href="../../std/heap/trait.Alloc.html#method.realloc_array">Read more</a></p>
</div><h4 id='method.dealloc_array' class="method"><span id='dealloc_array.v' class='invisible'><code>unsafe fn <a href='../../std/heap/trait.Alloc.html#method.dealloc_array' class='fnname'>dealloc_array</a>&lt;T&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ptr: <a class="struct" href="../../std/ptr/struct.NonNull.html" title="struct std::ptr::NonNull">NonNull</a>&lt;T&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;n: <a class="primitive" href="../primitive.usize.html">usize</a><br>) -&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="enum" href="../../std/heap/enum.AllocErr.html" title="enum std::heap::AllocErr">AllocErr</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/allocator.rs.html#1051-1063' title='goto source code'>[src]</a></span></h4>
<div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>allocator_api </code><a href="https://github.com/rust-lang/rust/issues/32838">#32838</a>)</summary><p>the precise API and guarantees it provides may be tweaked slightly, especially to possibly take into account the types being stored to make room for a future tracing garbage collector</p>
</details></div></div><div class='docblock'><p>Deallocates a block suitable for holding <code>n</code> instances of <code>T</code>. <a href="../../std/heap/trait.Alloc.html#method.dealloc_array">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/heap/struct.Heap.html" title="struct std::heap::Heap">Heap</a></code><a href='#impl-Default' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/heap.rs.html#77' 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; <a class="struct" href="../../std/heap/struct.Heap.html" title="struct std::heap::Heap">Heap</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/heap.rs.html#77' 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-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/heap/struct.Heap.html" title="struct std::heap::Heap">Heap</a></code><a href='#impl-Debug' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/heap.rs.html#77' 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, __arg_0: &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/alloc/heap.rs.html#77' 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></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>