pub fn try_channel<T, E, F>( size: usize, f: impl FnOnce(Sender<T>) -> F, ) -> impl Stream<Item = Result<T, E>>where F: Future<Output = Result<(), E>>,
Creates a new Stream that produces the items sent from a Future that can fail to the [mpsc::Sender] provided to the closure.
Stream
Future
mpsc::Sender