Macro cached::cached

source ยท
macro_rules! cached {
    ($cachename:ident;
     fn $name:ident ($($arg:ident : $argtype:ty),*) -> $ret:ty = $body:expr) => { ... };
    ($cachename:ident : $cachetype:ty = $cacheinstance:expr ;
     fn $name:ident ($($arg:ident : $argtype:ty),*) -> $ret:ty = $body:expr) => { ... };
    ($cachename:ident : $cachetype:ty = $cacheinstance:expr ;
     async fn $name:ident ($($arg:ident : $argtype:ty),*) -> $ret:ty = $body:block) => { ... };
}