backup_lib 0.2.0

backup macro to inject function into mod and actor
Documentation
#[macro_export]
macro_rules! inject_backup_data {
    () => {
        use backup_lib::backup_info::*;

        thread_local! {
          pub static BACKUP_INFO: RefCell<BackupInfo> = RefCell::new(BackupInfo::default());
        }

        pub fn backup_job_start()  {
            BACKUP_INFO.with(|s| {
                s.borrow_mut().backup_start();
            });
        }

        pub fn backup_job_finish()  {
            BACKUP_INFO.with(|s| {
                s.borrow_mut().backup_finish();
            });
        }

        pub fn backup_info_pre_upgrade() -> BackupInfo {
            BACKUP_INFO.with(|s| s.borrow().clone())
        }

        pub fn backup_info_post_upgrade(stable_state: BackupInfo) {
            BACKUP_INFO.with(|s| s.replace(stable_state));
        }
    }
}