MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / streaming

Function streaming

atomic-repository/src/content_search.rs:708–717  ·  view source on GitHub ↗
(
        files: &std::collections::BTreeMap<String, Vec<u8>>,
        pattern: &str,
        opts: ContentSearchOptions,
    )

Source from the content-addressed store, hash-verified

706 use super::*;
707
708 fn streaming(
709 files: &std::collections::BTreeMap<String, Vec<u8>>,
710 pattern: &str,
711 opts: ContentSearchOptions,
712 ) -> ContentSearchResult {
713 RecordedContentSearch::new(files.keys().map(String::as_str), pattern, opts)
714 .unwrap()
715 .run::<std::convert::Infallible>(|path| Ok(Some(files[path].clone())))
716 .unwrap()
717 }
718
719 #[test]
720 fn recorded_stream_matches_exhaustive_verifier_boundaries_and_filters() {

Calls 2

unwrapMethod · 0.45
cloneMethod · 0.45