Closed badicsalex closed 2 years ago
I think I could blanket implement Visitor
for FnMut<T>(item: T, event: Event)
and for FnMut<T>(item: T)
(Event::Enter
only). Would it suffice your use case?
Implementing visitor for Fn didn't even occur to me, but it would look great, yeah.
Hi,
I'm planning on using your crate for one of my projects, and I thought it would be great to have a default method on the
Drive
trait which accepts a closure instead of a fullVisitor
struct to reduce boilerplate.Something along the lines of
I'm pretty sure I'll implement this functionality in some kind of
util.rs
in the project, but it would be better to 'upstream' this functionality IMO. If you think too, I'd be happy to create a PR.