Replies: 1 comment 1 reply
-
Hi, and thanks for the question! At the moment cursive is not async aware. Now one issue is if you need to borrow
Overall it's very similar to using a background thread, but using an async task instead. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
trying to get this to work any suggestions?
Code that calls the callback
example callback using tokio as runtime btw
example error (note the expected and found match??)
"mismatched types expected trait `for<'r, 's> <for<'r, 's> fn(&'r mut Cursive, &'s AryaFunction) -> impl for<'r, 's> Future<Output = ()> {handle_function_call::<AryaFunction>} as FnOnce<(&'r mut Cursive, &'s AryaFunction)>>`\n found trait `for<'r, 's> <for<'r, 's> fn(&'r mut Cursive, &'s AryaFunction) -> impl for<'r, 's> Future<Output = ()> {handle_function_call::<AryaFunction>} as FnOnce<(&'r mut Cursive, &'s AryaFunction)>>`",
adding lifetime bounds
yields same error
Beta Was this translation helpful? Give feedback.
All reactions