cached icon indicating copy to clipboard operation
cached copied to clipboard

associated `static` items are not allowed

Open gitmalong opened this issue 3 years ago • 1 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?

gitmalong avatar Jul 03 '22 14:07 gitmalong

Root cause is https://github.com/jaemk/cached/issues/86 because my fn was within impl Block. Should be mentioned somewhere

gitmalong avatar Jul 03 '22 15:07 gitmalong