/// Save configuration into a given file.
Save configuration into a given file.
Save configuration into a given file .
fn save(&self, file: &str) -> Result<()> {
        let content     = try!(json::encode(self));
        let file        = try!(File::create(file));
        let mut bwriter = BufWriter::new(file);
        try!(bwriter.write(content.as_bytes()));
        Ok(())
    }
fn save ( & self , file : & str ) -> Result < ( ) > { let content = try ! ( json encode ( self ) ) ; let file = try ! ( File create ( file ) ) ; let mut bwriter = BufWriter :: new ( file ) ; try ! ( bwriter write ( content as_bytes ( ) ) ) ; Ok ( ( ) ) }
Save configuration into a given file.
Save configuration into a given file .
&self
file
&str