fn write_all_volatile(&mut self, mut slice: VolatileSlice) -> Result<()> {
        while !slice.is_empty() {
            let bytes_written = self.write_volatile(slice)?;
            if bytes_written == 0 {
                return Err(Error::from(ErrorKind::WriteZero));
            }
            // Will panic if read_volatile read more bytes than we gave it, which would be worthy of
            // a panic.
            slice = slice.offset(bytes_written).unwrap();
        }
        Ok(())
    }
/// Write bytes from the slice to the given file until all the bytes from the slice have been
/// written, or an error is returned.
Write bytes from the slice to the given file until all the bytes from the slice have been
written, or an error is returned.
Write bytes from the slice to the given file until all the bytes from the slice have been written or an error is returned .
fn write_all_volatile(&mut self, mut slice: VolatileSlice) -> Result<()> {
        while !slice.is_empty() {
            let bytes_written = self.write_volatile(slice)?;
            if bytes_written == 0 {
                return Err(Error::from(ErrorKind::WriteZero));
            }
            // Will panic if read_volatile read more bytes than we gave it, which would be worthy of
            // a panic.
            slice = slice.offset(bytes_written).unwrap();
        }
        Ok(())
    }
fn write_all_volatile ( & mut self , mut slice : VolatileSlice ) -> Result < ( ) > { while ! slice . is_empty ( ) { let bytes_written = self . write_volatile ( slice ) ? ; if bytes_written == 0 { return Err ( Error :: from ( ErrorKind :: WriteZero ) ) ; } // Will panic if read_volatile read more bytes than we gave it, which would be worthy of // a panic. slice = slice . offset ( bytes_written ) . unwrap ( ) ; } Ok ( ( ) ) }
Write bytes from the slice to the given file until all the bytes from the slice have been
written, or an error is returned.
Write bytes from the slice to the given file until all the bytes from the slice have been written or an error is returned .
&mut self
slice
VolatileSlice