pub trait AsStream<T> { // Required method fn as_stream(self: Rc<Self>) -> Rc<dyn Stream<T>>; }
Used co cast Rc of concrete stream into Rc of dyn Stream.