[][src]Macro kubos_service::push_err

macro_rules! push_err {
    ($master:expr, $err:expr) => { ... };
}

Convenience macro to push an error string onto the master errors vector

Examples

use kubos_service::push_err;
use std::cell::RefCell;
let master_err = RefCell::new(vec![]);

push_err!(master_err, "Message1".to_owned());
push_err!(master_err, "Message2".to_owned());

assert_eq!(
    vec!["Message1".to_owned(), "Message2".to_owned()],
    master_err.borrow().clone()
);