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)
| 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)] |