[−][src]Macro ts_static::ts_static_with_default
Same as ts_static only can be assigned a value from a function
Calue must be identifier of a function
Example
use lazy_static::lazy_static; use ts_static::*; fn my_default() -> i32 { 123 } ts_static_with_default!(MY_STATIC, i32, my_default); MY_STATIC.with(|x| { assert_eq!(123, *x); });