The closure struct in wasm-bindgen which looks like this
pub struct Closure<T: ?Sized> {
js: ManuallyDrop<JsValue>,
data: ManuallyDrop<Box<T>>,
}
And I am trying to implement a clone trait for a custom struct that uses the Closure struct
pub(crate) struct Listener {
// handler: fn(),
pub(crate) handler: Closure<dyn FnMut()>,
}
since the trait Clone is not implemented for Closure<dyn FnMut()>
How do I implement it?
Thanks