cached
cached copied to clipboard
associated `static` items are not allowed
#[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 https://github.com/jaemk/cached/issues/86 because my fn was within impl Block. Should be mentioned somewhere