Sophie

Sophie

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

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

    <title>std::ops::CoerceUnsized - 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 CoerceUnsized</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-CoerceUnsized%3CNonZero%3CU%3E%3E">NonZero&lt;T&gt;</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: 'CoerceUnsized', 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=''>CoerceUnsized</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/core/ops/unsize.rs.html#46-48' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'><div class="docblock attributes">#[lang = "coerce_unsized"]
</div>pub trait CoerceUnsized&lt;T&gt; { }</pre><div class='stability'><div class='stab unstable'><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>coerce_unsized </code><a href="https://github.com/rust-lang/rust/issues/27732">#27732</a>)</div></div><div class='docblock'><p>Trait that indicates that this is a pointer or a wrapper for one,
where unsizing can be performed on the pointee.</p>
<p>See the <a href="https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md">DST coercion RfC</a> and <a href="../../nomicon/coercions.html">the nomicon entry on coercion</a>
for more details.</p>
<p>For builtin pointer types, pointers to <code>T</code> will coerce to pointers to <code>U</code> if <code>T: Unsize&lt;U&gt;</code>
by converting from a thin pointer to a fat pointer.</p>
<p>For custom types, the coercion here works by coercing <code>Foo&lt;T&gt;</code> to <code>Foo&lt;U&gt;</code>
provided an impl of <code>CoerceUnsized&lt;Foo&lt;U&gt;&gt; for Foo&lt;T&gt;</code> exists.
Such an impl can only be written if <code>Foo&lt;T&gt;</code> has only a single non-phantomdata
field involving <code>T</code>. If the type of that field is <code>Bar&lt;T&gt;</code>, an implementation
of <code>CoerceUnsized&lt;Bar&lt;U&gt;&gt; for Bar&lt;T&gt;</code> must exist. The coercion will work by
coercing the <code>Bar&lt;T&gt;</code> field into <code>Bar&lt;U&gt;</code> and filling in the rest of the fields
from <code>Foo&lt;T&gt;</code> to create a <code>Foo&lt;U&gt;</code>. This will effectively drill down to a pointer
field and coerce that.</p>
<p>Generally, for smart pointers you will implement
<code>CoerceUnsized&lt;Ptr&lt;U&gt;&gt; for Ptr&lt;T&gt; where T: Unsize&lt;U&gt;, U: ?Sized</code>, with an
optional <code>?Sized</code> bound on <code>T</code> itself. For wrapper types that directly embed <code>T</code>
like <code>Cell&lt;T&gt;</code> and <code>RefCell&lt;T&gt;</code>, you
can directly implement <code>CoerceUnsized&lt;Wrap&lt;U&gt;&gt; for Wrap&lt;T&gt; where T: CoerceUnsized&lt;U&gt;</code>.
This will let coercions of types like <code>Cell&lt;Box&lt;T&gt;&gt;</code> work.</p>
<p><a href="../marker/trait.Unsize.html"><code>Unsize</code></a> is used to mark types which can be coerced to DSTs if behind
pointers. It is implemented automatically by the compiler.</p>
</div>
                <h2 id='foreign-impls' class='small-section-header'>
                  Implementations on Foreign Types<a href='#foreign-impls' class='anchor'></a>
                </h2>
            <h3 id='impl-CoerceUnsized%3CNonZero%3CU%3E%3E' class='impl'><span class='in-band'><code>impl&lt;T, U&gt; <a class="trait" href="../../std/ops/trait.CoerceUnsized.html" title="trait std::ops::CoerceUnsized">CoerceUnsized</a>&lt;<a class="struct" href="../../core/nonzero/struct.NonZero.html" title="struct core::nonzero::NonZero">NonZero</a>&lt;U&gt;&gt; for <a class="struct" href="../../core/nonzero/struct.NonZero.html" title="struct core::nonzero::NonZero">NonZero</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../core/nonzero/trait.Zeroable.html" title="trait core::nonzero::Zeroable">Zeroable</a> + <a class="trait" href="../../std/ops/trait.CoerceUnsized.html" title="trait std::ops::CoerceUnsized">CoerceUnsized</a>&lt;U&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="../../core/nonzero/trait.Zeroable.html" title="trait core::nonzero::Zeroable">Zeroable</a>,&nbsp;</span></code><a href='#impl-CoerceUnsized%3CNonZero%3CU%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/core/nonzero.rs.html#94' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'></div></span>
        <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/ops/unsize.rs.html#79' title='goto source code'>[src]</a></div><code>impl&lt;T, U&gt; CoerceUnsized&lt;<a class="primitive" href="../primitive.pointer.html">*const U</a>&gt; for <a class="primitive" href="../primitive.pointer.html">*const T</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Unsize.html" title="trait std::marker::Unsize">Unsize</a>&lt;U&gt; + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ops/unsize.rs.html#68' title='goto source code'>[src]</a></div><code>impl&lt;'a, T, U&gt; CoerceUnsized&lt;<a class="primitive" href="../primitive.pointer.html">*const U</a>&gt; for <a class="primitive" href="../primitive.reference.html">&amp;'a </a>T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Unsize.html" title="trait std::marker::Unsize">Unsize</a>&lt;U&gt; + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/cell.rs.html#1148' title='goto source code'>[src]</a></div><code>impl&lt;'b, T, U&gt; CoerceUnsized&lt;<a class="struct" href="../../std/cell/struct.RefMut.html" title="struct std::cell::RefMut">RefMut</a>&lt;'b, U&gt;&gt; for <a class="struct" href="../../std/cell/struct.RefMut.html" title="struct std::cell::RefMut">RefMut</a>&lt;'b, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Unsize.html" title="trait std::marker::Unsize">Unsize</a>&lt;U&gt; + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ptr.rs.html#2577' title='goto source code'>[src]</a></div><code>impl&lt;T, U&gt; CoerceUnsized&lt;<a class="struct" href="../../std/ptr/struct.NonNull.html" title="struct std::ptr::NonNull">NonNull</a>&lt;U&gt;&gt; for <a class="struct" href="../../std/ptr/struct.NonNull.html" title="struct std::ptr::NonNull">NonNull</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Unsize.html" title="trait std::marker::Unsize">Unsize</a>&lt;U&gt; + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/cell.rs.html#1047' title='goto source code'>[src]</a></div><code>impl&lt;'b, T, U&gt; CoerceUnsized&lt;<a class="struct" href="../../std/cell/struct.Ref.html" title="struct std::cell::Ref">Ref</a>&lt;'b, U&gt;&gt; for <a class="struct" href="../../std/cell/struct.Ref.html" title="struct std::cell::Ref">Ref</a>&lt;'b, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Unsize.html" title="trait std::marker::Unsize">Unsize</a>&lt;U&gt; + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ptr.rs.html#2433' title='goto source code'>[src]</a></div><code>impl&lt;T, U&gt; CoerceUnsized&lt;<a class="struct" href="../../std/ptr/struct.Unique.html" title="struct std::ptr::Unique">Unique</a>&lt;U&gt;&gt; for <a class="struct" href="../../std/ptr/struct.Unique.html" title="struct std::ptr::Unique">Unique</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Unsize.html" title="trait std::marker::Unsize">Unsize</a>&lt;U&gt; + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ops/unsize.rs.html#61' title='goto source code'>[src]</a></div><code>impl&lt;'a, T, U&gt; CoerceUnsized&lt;<a class="primitive" href="../primitive.pointer.html">*const U</a>&gt; for <a class="primitive" href="../primitive.reference.html">&amp;'a mut </a>T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Unsize.html" title="trait std::marker::Unsize">Unsize</a>&lt;U&gt; + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ops/unsize.rs.html#72' title='goto source code'>[src]</a></div><code>impl&lt;T, U&gt; CoerceUnsized&lt;<a class="primitive" href="../primitive.pointer.html">*mut U</a>&gt; for <a class="primitive" href="../primitive.pointer.html">*mut T</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Unsize.html" title="trait std::marker::Unsize">Unsize</a>&lt;U&gt; + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/cell.rs.html#936' title='goto source code'>[src]</a></div><code>impl&lt;T, U&gt; CoerceUnsized&lt;<a class="struct" href="../../std/cell/struct.RefCell.html" title="struct std::cell::RefCell">RefCell</a>&lt;U&gt;&gt; for <a class="struct" href="../../std/cell/struct.RefCell.html" title="struct std::cell::RefCell">RefCell</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/ops/trait.CoerceUnsized.html" title="trait std::ops::CoerceUnsized">CoerceUnsized</a>&lt;U&gt;,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ops/unsize.rs.html#65' title='goto source code'>[src]</a></div><code>impl&lt;'a, 'b, T, U&gt; CoerceUnsized&lt;<a class="primitive" href="../primitive.reference.html">&amp;'a </a>U&gt; for <a class="primitive" href="../primitive.reference.html">&amp;'b </a>T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;'b: 'a,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Unsize.html" title="trait std::marker::Unsize">Unsize</a>&lt;U&gt; + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ops/unsize.rs.html#55' title='goto source code'>[src]</a></div><code>impl&lt;'a, 'b, T, U&gt; CoerceUnsized&lt;<a class="primitive" href="../primitive.reference.html">&amp;'a </a>U&gt; for <a class="primitive" href="../primitive.reference.html">&amp;'b mut </a>T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;'b: 'a,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Unsize.html" title="trait std::marker::Unsize">Unsize</a>&lt;U&gt; + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/cell.rs.html#1279' title='goto source code'>[src]</a></div><code>impl&lt;T, U&gt; CoerceUnsized&lt;<a class="struct" href="../../std/cell/struct.UnsafeCell.html" title="struct std::cell::UnsafeCell">UnsafeCell</a>&lt;U&gt;&gt; for <a class="struct" href="../../std/cell/struct.UnsafeCell.html" title="struct std::cell::UnsafeCell">UnsafeCell</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/ops/trait.CoerceUnsized.html" title="trait std::ops::CoerceUnsized">CoerceUnsized</a>&lt;U&gt;,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/cell.rs.html#478' title='goto source code'>[src]</a></div><code>impl&lt;T, U&gt; CoerceUnsized&lt;<a class="struct" href="../../std/cell/struct.Cell.html" title="struct std::cell::Cell">Cell</a>&lt;U&gt;&gt; for <a class="struct" href="../../std/cell/struct.Cell.html" title="struct std::cell::Cell">Cell</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/ops/trait.CoerceUnsized.html" title="trait std::ops::CoerceUnsized">CoerceUnsized</a>&lt;U&gt;,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ops/unsize.rs.html#52' title='goto source code'>[src]</a></div><code>impl&lt;'a, T, U&gt; CoerceUnsized&lt;<a class="primitive" href="../primitive.reference.html">&amp;'a mut </a>U&gt; for <a class="primitive" href="../primitive.reference.html">&amp;'a mut </a>T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Unsize.html" title="trait std::marker::Unsize">Unsize</a>&lt;U&gt; + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ops/unsize.rs.html#58' title='goto source code'>[src]</a></div><code>impl&lt;'a, T, U&gt; CoerceUnsized&lt;<a class="primitive" href="../primitive.pointer.html">*mut U</a>&gt; for <a class="primitive" href="../primitive.reference.html">&amp;'a mut </a>T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Unsize.html" title="trait std::marker::Unsize">Unsize</a>&lt;U&gt; + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ops/unsize.rs.html#75' title='goto source code'>[src]</a></div><code>impl&lt;T, U&gt; CoerceUnsized&lt;<a class="primitive" href="../primitive.pointer.html">*const U</a>&gt; for <a class="primitive" href="../primitive.pointer.html">*mut T</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Unsize.html" title="trait std::marker::Unsize">Unsize</a>&lt;U&gt; + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/arc.rs.html#246' title='goto source code'>[src]</a></div><code>impl&lt;T, U&gt; CoerceUnsized&lt;<a class="struct" href="../../std/sync/struct.Weak.html" title="struct std::sync::Weak">Weak</a>&lt;U&gt;&gt; for std::sync::<a class="struct" href="../../std/sync/struct.Weak.html" title="struct std::sync::Weak">Weak</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Unsize.html" title="trait std::marker::Unsize">Unsize</a>&lt;U&gt; + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/rc.rs.html#1172' title='goto source code'>[src]</a></div><code>impl&lt;T, U&gt; CoerceUnsized&lt;<a class="struct" href="../../std/rc/struct.Weak.html" title="struct std::rc::Weak">Weak</a>&lt;U&gt;&gt; for std::rc::<a class="struct" href="../../std/rc/struct.Weak.html" title="struct std::rc::Weak">Weak</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Unsize.html" title="trait std::marker::Unsize">Unsize</a>&lt;U&gt; + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/boxed.rs.html#813' title='goto source code'>[src]</a></div><code>impl&lt;T, U&gt; CoerceUnsized&lt;<a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;U&gt;&gt; for <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Unsize.html" title="trait std::marker::Unsize">Unsize</a>&lt;U&gt; + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/rc.rs.html#295' title='goto source code'>[src]</a></div><code>impl&lt;T, U&gt; CoerceUnsized&lt;<a class="struct" href="../../std/rc/struct.Rc.html" title="struct std::rc::Rc">Rc</a>&lt;U&gt;&gt; for <a class="struct" href="../../std/rc/struct.Rc.html" title="struct std::rc::Rc">Rc</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Unsize.html" title="trait std::marker::Unsize">Unsize</a>&lt;U&gt; + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/arc.rs.html#210' title='goto source code'>[src]</a></div><code>impl&lt;T, U&gt; CoerceUnsized&lt;<a class="struct" href="../../std/sync/struct.Arc.html" title="struct std::sync::Arc">Arc</a>&lt;U&gt;&gt; for <a class="struct" href="../../std/sync/struct.Arc.html" title="struct std::sync::Arc">Arc</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Unsize.html" title="trait std::marker::Unsize">Unsize</a>&lt;U&gt; + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;U: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
</ul><script type="text/javascript" async
                         src="../../implementors/core/ops/unsize/trait.CoerceUnsized.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>