Releases: n0-computer/n0-watcher
Releases · n0-computer/n0-watcher
v0.3.0
Features
- Added
Watchable::has_watchers(&self) -> bool - Added
Watcher::is_connected(&self) -> bool
Breaking Changes
Watcher::getnow takes&mut selfinstead of&selfand returnsSelf::Valueinstead ofResult<Self::Value, Disconnected>.
It will now update the watcher to the latest value internally, so a call toWatcher::getin between twoWatcher::poll_updatedcalls will potentially have an effect it didn't have before.
It now also returns the last known state intsead of potentially returning disconnected.
If you want to know about the disconnected state, useWatcher::is_connected.InitializedFutnow implementsFuture<Output = T>instead ofFuture<Output = Result<T, Disconnected>>.
Should the underlying watchable disconnect, the future will now be pending forever.