/// Combinator that returns a stream that will gather some statistics and
/// pass them for inspection to the provided callback when the stream
/// completes.
///
/// # Examples
///
/// ```
/// use futures_stats::TimedStreamExt;
/// use futures::stream::{self, StreamExt};
///
/// # futures::executor::block_on(async {
/// let out = stream::iter([0u32; 3].iter())
///     .timed(|stats| {
///         async move {
///             assert_eq!(stats.count, 3);
///         }
///     })
///     .collect::<Vec<u32>>()
///     .await;
/// assert_eq!(out, vec![0, 0, 0]);
/// # });
/// ```
Combinator that returns a stream that will gather some statistics and
pass them for inspection to the provided callback when the stream
completes.
Combinator that returns a stream that will gather some statistics and pass them for inspection to the provided callback when the stream completes .
fn timed<C, F>(self, callback: C) -> TimedStream<Self, C, F>
    where
        C: FnOnce(StreamStats) -> F,
        F: Future<Output = ()>,
    {
        TimedStream::new(self, callback)
    }
fn timed < C , F > ( self , callback : C ) -> TimedStream < Self , C , F > where C : FnOnce ( StreamStats ) -> F , F : Future < Output = ( ) > , { TimedStream :: new ( self , callback ) }
Combinator that returns a stream that will gather some statistics and
pass them for inspection to the provided callback when the stream
completes.
Combinator that returns a stream that will gather some statistics and pass them for inspection to the provided callback when the stream completes .
self
callback
C
examples
```
use futures_stats::TimedStreamExt;
use futures::stream::{self, StreamExt}.
` ` ` use futures_stats :: TimedStreamExt ; use futures :: stream :: { self StreamExt } .
futures::executor::block_on(async {
None
});
None