Skip to main content

subscribe

Function subscribe 

pub fn subscribe<S, Q>(
    changes: Receiver<u64>,
    service: S,
    query: Q,
) -> impl Stream<Item = Result<<S as Service<Q>>::Output, <S as Service<Q>>::Error>> + Send + 'static
where S: Service<Q>, Q: Clone + Send + 'static,
Available on crate feature inspect only.
Expand description

Subscribe before evaluating the initial query. Slow consumers coalesce revisions and receive fresh content instead of accumulating an unbounded event queue. Closing the change source ends the subscription after its last refreshed result.