jdx / demand

prompt library for rust
https://docs.rs/demand
MIT License
57 stars 4 forks source link

feat: implement spinner #13

Closed roele closed 9 months ago

roele commented 9 months ago

A first functional draft for #12.

What i struggle with is passing a function to run with arbritary number of parameters/return types. These generic trait definitions seem a bit cryptic and hard. Not sure if the current approach is good enough. One could borrow by using a move || {} though.

jdx commented 9 months ago

yeah it's definitely tricky dealing with the send, sync, 'static stuff. I think what you have here is a good start though.