Allow the caller to supply their own Writer implementation.#4
Conversation
This lets the caller print the REPL in any style they want.
|
Hey @db48x! My main concern is requiring nightly in the master branch. Not sure if I'm comfortable with that idea (I have a feeling you knew this comment was coming 😄). I'd be OK with it if this feature gate would be broken soon (Rust 2021?), but that doesn't seem to be the case 😞 RFC link Maybe, to avoid this, as a first step, if After that, if the Though there's a catch! The errors returned by the An easy way out would be to make the error dynamic, with Do you agree with my line of thought? I hope I'm not overly concerned here. My second concern is how deeply connected to crossterm rucline is. For example, the event loop outside of the rendering already requires crossterm in raw mode. Allowing the I'm interested on how you envision this! I guess that your port of reposurgeon already put this in action! I'm glad to move this PR forward! |
|
Yes, using specialization was a last–minute thing; when I started writing the Make the error type an associated type is a very good idea as well; at the moment I my code can only return the same crossterm::ErrorKind as the default My port of Reposurgeon is using this, but only on a side branch: https://gitlab.com/db48x/reposurgeon/-/commits/rust-port-with-rucline. The whole thing is very much a prototype. Writing the |
b3f19fe to
7b94560
Compare
This lets the caller print the REPL in any style they want.