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

Method to_manifest_text

atomic-objects/src/view_snapshot.rs:179–188  ·  view source on GitHub ↗

Render the legacy tab-separated manifest text this snapshot represents, for the transitional `?view-manifest` compatibility path. New code should read the object directly.

(&self, name: &str)

Source from the content-addressed store, hash-verified

177 /// for the transitional `?view-manifest` compatibility path. New code
178 /// should read the object directly.
179 pub fn to_manifest_text(&self, name: &str) -> String {
180 let parent = self.parent_view.as_deref().unwrap_or("-");
181 let state = self.merkle_state.as_deref().unwrap_or("-");
182 let mut out = format!("{}\t{}\t{}\t{}\n", name, self.scope, parent, state);
183 for hash in &self.own_changes {
184 out.push_str(hash);
185 out.push('\n');
186 }
187 out
188 }
189}
190
191#[cfg(test)]

Callers 4

parse_advertisementFunction · 0.80
manifest_from_packFunction · 0.80

Calls 1

pushMethod · 0.45

Tested by 1