pub fn event_stream_from_state(
    state: StateProxy
) -> Result<impl Stream<Item = Result<Event, WatchError>>, WatcherCreationError>
Expand description

Connects to the watcher protocol and converts the Hanging-Get style API into an Event stream.

Each call to Watch returns a batch of events, which are flattened into a single stream. If an error is encountered while calling Watch or while converting the event, the stream is immediately terminated.