I’m trying to use an external crate’s (logwatch) function that takes a callback function as input. Here’s the sig:
pub fn watch<F: ?Sized>(&mut self, callback: &F) where F: Fn(String),
It works but my (lame) attempts to modify external data with it have failed. Here’s my last attempt on the playground.
I’ll probably end up implementing the external lib’s functionality myself, but was wondering if there was a way to make this work?