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

    <title>std::io::WriteExt - Rust</title>

    <link rel="stylesheet" type="text/css" href="../../main.css">

    <link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico">
    
</head>
<body class="rustdoc">
    <!--[if lte IE 8]>
    <div class="warning">
        This old browser is unsupported and will most likely display funky
        things.
    </div>
    <![endif]-->

    

    <section class="sidebar">
        <a href='../../std/index.html'><img src='http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png' alt='' width='100'></a>
        <p class='location'><a href='../index.html'>std</a>::<wbr><a href='index.html'>io</a></p><script>window.sidebarCurrent = {name: 'WriteExt', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script>
    </section>

    <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 trait">
<h1 class='fqn'><span class='in-band'>Trait <a href='../index.html'>std</a>::<wbr><a href='index.html'>io</a>::<wbr><a class='trait' href=''>WriteExt</a><wbr><a class='stability Unstable' title='may merge into the Read trait'>Unstable</a></span><span class='out-of-band'><span id='render-detail'>
            <a id="collapse-all" href="#">[-]</a>&nbsp;<a id="expand-all" href="#">[+]</a>
        </span><a id='src-42358' href='../../src/std/io/mod.rs.html#430-452'>[src]</a></span></h1>
<pre class='rust trait'>pub trait WriteExt: <a class='trait' href='../../std/io/trait.Write.html' title='std::io::Write'>Write</a> + <a class='trait' href='../../std/marker/trait.Sized.html' title='std::marker::Sized'>Sized</a> {
    fn <a href='#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; &amp;mut Self { ... }
    fn <a href='#method.broadcast' class='fnname'>broadcast</a>&lt;W: <a class='trait' href='../../std/io/trait.Write.html' title='std::io::Write'>Write</a>&gt;(self, other: W) -&gt; <a class='struct' href='../../std/io/struct.Broadcast.html' title='std::io::Broadcast'>Broadcast</a>&lt;Self, W&gt; { ... }
}</pre><div class='docblock'><p>Extension methods for all instances of <code>Write</code>, typically imported through
<code>std::io::prelude::*</code>.</p>
</div>
            <h2 id='provided-methods'>Provided Methods</h2>
            <div class='methods'>
        <h3 id='method.by_ref' class='method'><a class='stability Stable' title='Stable'></a><code>fn <a href='#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; &amp;mut Self</code></h3><div class='docblock'><p>Create a &quot;by reference&quot; adaptor for this instance of <code>Write</code>.</p>

<p>The returned adaptor also implements <code>Write</code> and will simply borrow this
current writer.</p>
</div><h3 id='method.broadcast' class='method'><a class='stability Unstable' title='Unstable: the semantics of a partial read/write of where errors happen is currently unclear and may change'></a><code>fn <a href='#method.broadcast' class='fnname'>broadcast</a>&lt;W: <a class='trait' href='../../std/io/trait.Write.html' title='std::io::Write'>Write</a>&gt;(self, other: W) -&gt; <a class='struct' href='../../std/io/struct.Broadcast.html' title='std::io::Broadcast'>Broadcast</a>&lt;Self, W&gt;</code></h3><div class='docblock'><p>Creates a new writer which will write all data to both this writer and
another writer.</p>

<p>All data written to the returned writer will both be written to <code>self</code>
as well as <code>other</code>. Note that the error semantics of the current
implementation do not precisely track where errors happen. For example
an error on the second call to <code>write</code> will not report that the first
call to <code>write</code> succeeded.</p>
</div></div>
        <h2 id='implementors'>Implementors</h2>
        <ul class='item-list' id='implementors-list'>
    <li><a class='stability Stable' title='Stable'></a><code>impl&lt;T: <a class='trait' href='../../std/io/trait.Write.html' title='std::io::Write'>Write</a>&gt; <a class='trait' href='../../std/io/trait.WriteExt.html' title='std::io::WriteExt'>WriteExt</a> for T</code></li>
</ul><script type="text/javascript" async
                              src="../../implementors/std/io/trait.WriteExt.js">
                      </script></section>
    <section id='search' class="content hidden"></section>

    <section class="footer"></section>

    <div id="help" class="hidden">
        <div class="shortcuts">
            <h1>Keyboard shortcuts</h1>
            <dl>
                <dt>?</dt>
                <dd>Show this help dialog</dd>
                <dt>S</dt>
                <dd>Focus the search field</dd>
                <dt>&larrb;</dt>
                <dd>Move up in search results</dd>
                <dt>&rarrb;</dt>
                <dd>Move down in search results</dd>
                <dt>&#9166;</dt>
                <dd>Go to active search result</dd>
            </dl>
        </div>
        <div class="infos">
            <h1>Search tricks</h1>
            <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>typedef</code> (or
                <code>tdef</code>).
            </p>
        </div>
    </div>

    

    <script>
        window.rootPath = "../../";
        window.currentCrate = "std";
        window.playgroundUrl = "http://play.rust-lang.org/";
    </script>
    <script src="../../jquery.js"></script>
    <script src="../../main.js"></script>
    <script src="../../playpen.js"></script>
    <script async src="../../search-index.js"></script>
</body>
</html>