diff --git a/src/core/utils/stream/broadband.rs b/src/core/utils/stream/broadband.rs index 6d1ff6fe..282008e7 100644 --- a/src/core/utils/stream/broadband.rs +++ b/src/core/utils/stream/broadband.rs @@ -35,6 +35,13 @@ where Fut: Future> + Send, U: Send; + fn broadn_flat_map(self, n: N, f: F) -> impl Stream + Send + where + N: Into>, + F: Fn(Item) -> Fut + Send, + Fut: Stream + Send + Unpin, + U: Send; + fn broadn_then(self, n: N, f: F) -> impl Stream + Send where N: Into>, @@ -70,6 +77,16 @@ where self.broadn_filter_map(None, f) } + #[inline] + fn broad_flat_map(self, f: F) -> impl Stream + Send + where + F: Fn(Item) -> Fut + Send, + Fut: Stream + Send + Unpin, + U: Send, + { + self.broadn_flat_map(None, f) + } + #[inline] fn broad_then(self, f: F) -> impl Stream + Send where @@ -122,6 +139,17 @@ where .ready_filter_map(identity) } + #[inline] + fn broadn_flat_map(self, n: N, f: F) -> impl Stream + Send + where + N: Into>, + F: Fn(Item) -> Fut + Send, + Fut: Stream + Send + Unpin, + U: Send, + { + self.flat_map_unordered(n.into().unwrap_or_else(automatic_width), f) + } + #[inline] fn broadn_then(self, n: N, f: F) -> impl Stream + Send where