/// Write a `Buf` into this value, returning how many bytes were written.
///
/// Note that this method will advance the `buf` provided automatically by
/// the number of bytes written.
Write a `Buf` into this value, returning how many bytes were written.
Note that this method will advance the `buf` provided automatically by
the number of bytes written.
Write a ` Buf ` into this value returning how many bytes were written . Note that this method will advance the ` buf ` provided automatically by the number of bytes written .
fn write_buf<B: Buf>(&mut self, buf: &mut B) -> Poll<usize, std_io::Error>
        where Self: Sized,
    {
        if !buf.has_remaining() {
            return Ok(Async::Ready(0));
        }
        let n = try_nb!(self.write(buf.bytes()));
        buf.advance(n);
        Ok(Async::Ready(n))
    }
fn write_buf < B : Buf > ( & mut self , buf : & mut B ) -> Poll < usize , std_io :: Error > where Self : Sized , { if ! buf . has_remaining ( ) { return Ok ( Async :: Ready ( 0 ) ) ; } let n = try_nb ! ( self write ( buf bytes ( ) ) ) ; buf . advance ( n ) ; Ok ( Async :: Ready ( n ) ) }
Write a `Buf` into this value, returning how many bytes were written.
Write a ` Buf ` into this value returning how many bytes were written .
&mut self
buf
&mut B