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

Method fetch_view_manifest

atomic-cli/src/commands/clone/command.rs:346–356  ·  view source on GitHub ↗

Fetch and validate one view's manifest from the remote. Returns `Ok(None)` if the remote does not have the view.

(
        &self,
        remote: &HttpRemote,
        view: &str,
    )

Source from the content-addressed store, hash-verified

344 ///
345 /// Returns `Ok(None)` if the remote does not have the view.
346 async fn fetch_view_manifest(
347 &self,
348 remote: &HttpRemote,
349 view: &str,
350 ) -> CliResult<Option<ViewManifest>> {
351 match remote.get_view_manifest(view).await {
352 Ok(Some(text)) => parse_remote_manifest(view, &text, &self.url).map(Some),
353 Ok(None) => Ok(None),
354 Err(e) => Err(self.manifest_fetch_error(e)),
355 }
356 }
357
358 /// Fetch the requested view's manifest and walk its parent chain up to
359 /// the root, returning the manifests in root→leaf apply order.

Callers 2

fetch_manifest_chainMethod · 0.80

Calls 3

get_view_manifestMethod · 0.80
manifest_fetch_errorMethod · 0.80
parse_remote_manifestFunction · 0.70

Tested by

no test coverage detected