I am trying to connect DOM events with
web_sys, e.g. in a click handler
set_onmousedown() to functions that are
async, because they perform REST calls, which are
Promises which are mapped to Rust
web_sys examples this is done using non-asynchronous closures.
async closure are only available in Rust nightly, but i shy away from this because i fear using nightly will open further problems.
Ideally i'd like to register a plain
async Rust function, but i don't see how.
Function works but
!Sync. This means, i can not hold them in e.g.
lazy_static and have to recreate them each time an event is triggered.
I don't see a satisfying solution. Any ideas?