macro_rules! append_to_file {
    ($path:expr,$data:expr) => { ... };
}
Expand description

append data to file

   match append_to_file!("./foo.txt", "demon".as_bytes()) {
       Ok(_r) => {
               println!("done");
       }
       Err(_e) => {}
   }