Add Send + Sync + 'static bounds to the Error type
mcobzarenco opened this issue · 1 comments
Add Send + Sync + 'static
bounds to the error type, i. e. change dyn Error
to dyn Error + Send + Sync + 'static
.
In addition to being able to modify the clipboard and handle the error in a different thread, this change would enable interoperability with anyhow
, failure
and other error handling libraries.
x11_clipboard
's Error type has these bounds (I have tried adding it to rust-clipboard
), but I'm not sure about macos / windows / wayland. I'm happy to research it and create a PR to test all the platforms if CI tests all environments? I only have access to Linux.
Wayland clipboard is running on its own thread and you request data from it via channels, so it's thread safe, since you only move channel senders and receivers around.