macro_rules! ctor_static {
    () => { ... };
    ($($body:tt)*) => { ... };
}
Available on crate feature ctor only.
Expand description

Generate a static with a ctor procedure.

use global::ctor_static;

ctor_static! {
    pub MY_NUM: i32 = { 5 };
    MY_OTHER_NUM: i32 = { *MY_NUM * 2 };
};