pub fn copy_to<W>(&mut self, writer: &mut W) -> Result<u64>
    where
        W: Write + Send + Unpin + 'static,
    {
        let mut n = 0;
        while let Some(buf) = self.next() {
            let b = buf?;
            writer.write_all(&b)?;
            n += b.len();
        }
        writer.flush()?;
        Ok(n as u64)
    }
/// Copys bytes to a writer.
Copys bytes to a writer.
Copys bytes to a writer .
pub fn copy_to<W>(&mut self, writer: &mut W) -> Result<u64>
    where
        W: Write + Send + Unpin + 'static,
    {
        let mut n = 0;
        while let Some(buf) = self.next() {
            let b = buf?;
            writer.write_all(&b)?;
            n += b.len();
        }
        writer.flush()?;
        Ok(n as u64)
    }
pub fn copy_to < W > ( & mut self , writer : & mut W ) -> Result < u64 > where W : Write + Send + Unpin + ' static , { let mut n = 0 ; while let Some ( buf ) = self . next ( ) { let b = buf ? ; writer . write_all ( & b ) ? ; n += b . len ( ) ; } writer . flush ( ) ? ; Ok ( n as u64 ) }
Copys bytes to a writer.
Copys bytes to a writer .
&mut self
writer
&mut W
&mut self
writer
&mut W