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

Function write_effect_target

atomic-cli/src/commands/op/output.rs:224–287  ·  view source on GitHub ↗
(output: &mut String, indent: usize, target: &EffectTargetDto)

Source from the content-addressed store, hash-verified

222}
223
224fn write_effect_target(output: &mut String, indent: usize, target: &EffectTargetDto) {
225 match target {
226 EffectTargetDto::FilesystemPath { path } => {
227 write_key_value(output, indent, "kind", "filesystem_path");
228 write_key_value(output, indent, "path", path);
229 }
230 EffectTargetDto::WorkspacePath { working_copy, path } => {
231 write_key_value(output, indent, "kind", "workspace_path");
232 write_key_value(output, indent, "working_copy", working_copy);
233 write_key_value(output, indent, "path", path);
234 }
235 EffectTargetDto::ShelfPath {
236 working_copy,
237 view,
238 path,
239 } => {
240 write_key_value(output, indent, "kind", "shelf_path");
241 write_key_value(output, indent, "working_copy", working_copy);
242 write_key_value(output, indent, "view", view);
243 write_key_value(output, indent, "path", path);
244 }
245 EffectTargetDto::GitObject { object } => {
246 write_key_value(output, indent, "kind", "git_object");
247 write_git_object(output, indent, object);
248 }
249 EffectTargetDto::GitIndex { working_copy } => {
250 write_key_value(output, indent, "kind", "git_index");
251 write_key_value(output, indent, "working_copy", working_copy);
252 }
253 EffectTargetDto::GitRef { name } => {
254 write_key_value(output, indent, "kind", "git_ref");
255 write_key_value(output, indent, "name", name);
256 }
257 EffectTargetDto::GitHead { working_copy } => {
258 write_key_value(output, indent, "kind", "git_head");
259 write_key_value(output, indent, "working_copy", working_copy);
260 }
261 EffectTargetDto::Checkpoint {
262 working_copy,
263 checkpoint_kind,
264 } => {
265 write_key_value(output, indent, "kind", "checkpoint");
266 write_key_value(output, indent, "working_copy", working_copy);
267 write_key_value(output, indent, "checkpoint_kind", checkpoint_kind);
268 }
269 EffectTargetDto::WorkingCopy { working_copy } => {
270 write_key_value(output, indent, "kind", "working_copy");
271 write_key_value(output, indent, "working_copy", working_copy);
272 }
273 EffectTargetDto::Verification {
274 working_copy,
275 scope,
276 } => {
277 write_key_value(output, indent, "kind", "verification");
278 write_key_value(
279 output,
280 indent,
281 "working_copy",

Callers 1

write_effectFunction · 0.85

Calls 2

write_key_valueFunction · 0.85
write_git_objectFunction · 0.85

Tested by

no test coverage detected