What's the best way to filter an async stream? The types are kind of confusing to me.
I have a predicate that I want to apply to the stream like this:
async fn is_match(p: impl AsRef<Path>) -> bool
then I want to collect the results into a
So the function that I would want to write is this:
async fn read_dir_filtered<P: AsRef<Path>>(path: P) -> Result<Vec<PathBuf>>
which in turn needs to uses
Ideas for this?