I want to call an async function from my template, but doing so throws the following error:
no field `r#await` on type `impl Future<Output = String>`
to `.await` a `Future`, switch to Rust 2018 or later
set `edition = "2024"` in `Cargo.toml`
for more on editions, read https://doc.rust-lang.org/edition-guiderustc
This would be useful when creating frontend elements that require calling async functions. For example, an async database call.
If there is a way to do this that I am missing, please feel free to correct me.
I want to call an async function from my template, but doing so throws the following error:
This would be useful when creating frontend elements that require calling async functions. For example, an async database call.
If there is a way to do this that I am missing, please feel free to correct me.