pub fn persist(&mut self) -> Result<()> {
        let dest        = Path::new(&self.filename);
        let mut options = OpenOptions::new();

        // Keep file around with -rw-r--r-- permissions.
        #[cfg(target_family = "unix")]
        options.mode(0o644);

        let mut writer = options
            .create(true)
            .write(true)
            .truncate(true)
            .open(&dest)?;

        let mut handle = self.handle()?;

        io::copy(&mut handle, &mut writer)?;

        Ok(())
    }
// Persist the file into our current directory as self.filename
Persist the file into our current directory as self.filename
Persist the file into our current directory as self . filename
pub fn persist(&mut self) -> Result<()> {
        let dest        = Path::new(&self.filename);
        let mut options = OpenOptions::new();
        // Keep file around with -rw-r--r-- permissions.
        #[cfg(target_family = "unix")]
        options.mode(0o644);
        let mut writer = options
            .create(true)
            .write(true)
            .truncate(true)
            .open(&dest)?;
        let mut handle = self.handle()?;
        io::copy(&mut handle, &mut writer)?;
        Ok(())
    }
pub fn persist ( & mut self ) -> Result < ( ) > { let dest = Path :: new ( & self . filename ) ; let mut options = OpenOptions :: new ( ) ; // Keep file around with -rw-r--r-- permissions. # [ cfg ( target_family " " ) ] options . mode ( 0o644 ) ; let mut writer = options . create ( true ) . write ( true ) . truncate ( true ) . open ( & dest ) ? ; let mut handle = self . handle ( ) ? ; io :: copy ( & mut handle , & mut writer ) ? ; Ok ( ( ) ) }
Persist the file into our current directory as self.filename
Persist the file into our current directory as self . filename
&mut self
&mut self