pub(crate) fn new(watch: Watch, inner: T) -> Self {
        // XXX Unfortunately the `Watch` API doesn't give us any means to poll for updates, so we
        // have to box the async call to poll it from the stream.
        let shutdown = Box::pin(async move {
            let _ = watch.signaled().await;
        });
        Self { inner, shutdown }
    }
/// Wraps a `Future` or `Stream` that completes when the shutdown watch fires.
///
/// The inner `Future`/`Stream` is given the chance to complete before the shutdown watch is
/// polled so that it has a chance to complete its work before the task is cancelled.
Wraps a `Future` or `Stream` that completes when the shutdown watch fires.
The inner `Future`/`Stream` is given the chance to complete before the shutdown watch is
polled so that it has a chance to complete its work before the task is cancelled.
Wraps a ` Future ` or ` Stream ` that completes when the shutdown watch fires . The inner ` Future ` / ` Stream ` is given the chance to complete before the shutdown watch is polled so that it has a chance to complete its work before the task is cancelled .
pub(crate) fn new(watch: Watch, inner: T) -> Self {
        // XXX Unfortunately the `Watch` API doesn't give us any means to poll for updates, so we
        // have to box the async call to poll it from the stream.
        let shutdown = Box::pin(async move {
            let _ = watch.signaled().await;
        });
        Self { inner, shutdown }
    }
pub ( crate ) fn new ( watch : Watch , inner : T ) -> Self { // XXX Unfortunately the `Watch` API doesn't give us any means to poll for updates, so we // have to box the async call to poll it from the stream. let shutdown = Box :: pin ( async move { let _ = watch . signaled ( ) . await ; } ) ; Self { inner , shutdown } }
Wraps a `Future` or `Stream` that completes when the shutdown watch fires.
Wraps a ` Future ` or ` Stream ` that completes when the shutdown watch fires .
watch
Watch
inner
T
watch
Watch
inner
T