Emit update to whole object with zbus

⚓ Rust    📅 2025-11-19    👤 surdeus    👁️ 10      

surdeus

I'm writing a playerctld clone with zbus, which is the following:

I have a list of players (zbus proxies on a given interface I), and my program registers as a player (zbus service that serves I) by forwarding all calls to the "active player". However, the "active player" can change (to another one on the list).

When the "active player" changes, the program should emit a PropertiesChanged update, but in order to avoid unnecessary DBus method calls, I want to have a single big update signal and not multiple small updates.

I could do that with a GetAll call preceeding the property update, but that again introduces unnecessary DBus calls. Moreover, I cache every property on proxy creation, so I know that all the properties I need are just in the proxy cache, but it doesn't seem like there is a way to just dump the cache of a zbus proxy

What is the way to go ?

1 post - 1 participant

Read full topic

🏷️ Rust_feed