kurtlawrence / papyrus

(Rust) repl
MIT License
439 stars 14 forks source link

Add on exit function #85

Closed kurtlawrence closed 4 years ago

kurtlawrence commented 4 years ago

Add a callback for when the REPL is exiting.

The arguments for the function should be &mut Repl<Read, D> and &mut D.

This will mean a restructure of the running callbacks will need to be undertaken, as the current system uses closures to capture the D reference. Possibly a closure can be used to feed the release of a &mut D but this will need to be rethought. A chance to clean up the code somewhat.