No description
This changes RootNodes::list to return a BoxStream<'static, _>, and then drops all the mpsc sender / receiver complexity we were having. There's also no need to worry about channel buffer sizes - all current RootNodes implementations are immediately ready to yield new elements in the stream. Assuming there's new implementations that do take some time, we can deal with buffer sizes on the producer size, which might know its own batch sizes better. RootNodes now doesn't need to implement Clone/Send anymore, and can have non-static lifetimes. As long as its the list method returns a BoxStream<'static>, we're fine with all that. On a first look, this seems like we now need to do more cloning upfront for the BTreeMap and Directory RootNodes impls. However, we already had to clone the entire thing at `self.root_nodes_provider.clone()`, and then did it again for each element. Now we get an owned version of the data whenever a list() call happens, and then just move owned things around. Change-Id: I85fbca0e1171014ae85eeb03b3d58e6176ef4e2d Reviewed-on: https://cl.snix.dev/c/snix/+/30549 Autosubmit: Florian Klink <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: besadii |
||
|---|---|---|
| .gcroots | ||
| .nixery | ||
| contrib | ||
| fun/solves-this | ||
| nix | ||
| ops | ||
| snix | ||
| third_party | ||
| tools | ||
| web | ||
| .editorconfig | ||
| .envrc | ||
| .git-blame-ignore-revs | ||
| .gitignore | ||
| .gitreview | ||
| .hgignore | ||
| .mailmap | ||
| .rgignore | ||
| buf.gen.yaml | ||
| buf.yaml | ||
| default.nix | ||
| LICENSE | ||
| OWNERS | ||
| README.md | ||
| RULES | ||
| rustfmt.toml | ||