pub fn write(&mut self, chunk: &Chunk)-> Result<()> {
        if let Some(complete_bytes) = self.store_remainder(chunk)?{
            for byte in complete_bytes.iter(){
                let _ = self.destination.write(&[*byte])
                    .chain_err(||"An IO error happened when trying to write chunk to destination file.")?;
            }
        }
        Ok(())
    }
/// Write Chunk into *self.destination* file.
///
/// Actually only complete bytes will be written into file. Incomplete remainder bytes
/// will be stored into self.pending_bytes until they fill up. When pending_bytes fills
/// it is written and replaced by new exceeding bits.
Write Chunk into *self.destination* file.
Actually only complete bytes will be written into file. Incomplete remainder bytes
will be stored into self.pending_bytes until they fill up. When pending_bytes fills
it is written and replaced by new exceeding bits.
Write Chunk into * self . destination * file . Actually only complete bytes will be written into file . Incomplete remainder bytes will be stored into self . pending_bytes until they fill up . When pending_bytes fills it is written and replaced by new exceeding bits .
pub fn write(&mut self, chunk: &Chunk)-> Result<()> {
        if let Some(complete_bytes) = self.store_remainder(chunk)?{
            for byte in complete_bytes.iter(){
                let _ = self.destination.write(&[*byte])
                    .chain_err(||"An IO error happened when trying to write chunk to destination file.")?;
            }
        }
        Ok(())
    }
pub fn write ( & mut self , chunk : & Chunk ) -> Result < ( ) > { if let Some ( complete_bytes ) = self . store_remainder ( chunk ) ? { for byte in complete_bytes . iter ( ) { let _ = self . destination . write ( & [ * byte ] ) . chain_err ( | | " " ) ? ; } } Ok ( ( ) ) }
Write Chunk into *self.destination* file.
Write Chunk into * self . destination * file .
&mut self
chunk
&Chunk
&mut self
chunk
&Chunk