jaemk / cached

Rust cache structures and easy function memoization

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

associated `static` items are not allowed

gitmalong opened this issue · comments

      #[cached(
        convert = r##"{ format!("{}", address) }"##,
        type = "SizedCache<String, String>",
        create = "{ SizedCache::with_size(1000) }",
    )]
    async fn get_cached(
        address: String,
    ) -> String {
        Ok("test".to_string())
    }

--> associated static items are not allowedrustc

cached = { version = "0.34.1" }

Any idea?

Root cause is #86 because my fn was within impl Block. Should be mentioned somewhere