API for converting Message to dbus-proxy generated signal types
I create a Connection
, then I subscribe to some events using DBusProxy::add_match()
, then I create MessageStream
from said connection.
When I finally receive a message, I think it would be intuitive if I could write something like
let message = stream.next().await
if let Ok(signal) = PropertiesChanged::try_from(message) {
// ...
}
Maybe I'm doing something wrong, and this is already possible? And what is the recommended way to deal with messages from different interfaces?