Lazydeed — a tiny crate that turns functions into lazy tasks
The Rust Programming Language Forum
Lazydeed — a tiny crate that turns functions into lazy tasks
A tiny crate that turns functions into lazy tasks. Defer any function call — sync or async — until you're ready to run it. One attribute, and a task becomes just a value. The idea is easy to grasp if you know async — the mechanics are very similar. The #[task] attribute rewrites the function so the call only captures the arguments and returns a task, while the function body is moved into run and executes there. sync function → Task, run returns the value async function → AsyncTask, run retur...
A tiny crate that turns functions into lazy tasks. Defer any function call — sync or async — until you're ready to run it. One attribute, and a task becomes just a value. The…
0 comments
No comments yet.