Macro cognitive_qualia::define_ref [] [src]

macro_rules! define_ref {
    (struct $name:ty as $ref_name:ident) => { ... };
    (trait $name:ty as $ref_name:ident) => { ... };
    (_impl_ $name:ty as $ref_name:ident) => { ... };
}

This macro helps define structure being Rc<RefCell> for another structure and implements methods for borrowing it. Borrowing it when already borrowed mutably is program logic error and suitable warning is logged in such case.