(output: &mut String, indent: usize, receipt: &EffectReceiptDto)
| 324 | } |
| 325 | |
| 326 | fn write_receipt(output: &mut String, indent: usize, receipt: &EffectReceiptDto) { |
| 327 | writeln!(output, "{}- id: {}", spaces(indent), receipt.id).unwrap(); |
| 328 | write_key_value(output, indent + 2, "operation", &receipt.operation); |
| 329 | write_key_value( |
| 330 | output, |
| 331 | indent + 2, |
| 332 | "effect_ordinal", |
| 333 | &receipt |
| 334 | .effect_ordinal |
| 335 | .map(|ordinal| ordinal.to_string()) |
| 336 | .unwrap_or_else(|| "none".to_string()), |
| 337 | ); |
| 338 | write_key_value(output, indent + 2, "attempt", &receipt.attempt.to_string()); |
| 339 | write_key_value(output, indent + 2, "kind", &receipt.kind); |
| 340 | write_timestamp( |
| 341 | output, |
| 342 | indent + 2, |
| 343 | receipt.timestamp_ms, |
| 344 | receipt.timestamp_utc.as_deref(), |
| 345 | ); |
| 346 | writeln!(output, "{} observed_old:", spaces(indent)).unwrap(); |
| 347 | match &receipt.observed_old { |
| 348 | Some(value) => write_effect_value(output, indent + 4, value), |
| 349 | None => writeln!(output, "{}none", spaces(indent + 4)).unwrap(), |
| 350 | } |
| 351 | writeln!(output, "{} observed_new:", spaces(indent)).unwrap(); |
| 352 | match &receipt.observed_new { |
| 353 | Some(value) => write_effect_value(output, indent + 4, value), |
| 354 | None => writeln!(output, "{}none", spaces(indent + 4)).unwrap(), |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | fn write_repo_state(output: &mut String, indent: usize, state: &RepoStateDto) { |
| 359 | match &state.view { |
no test coverage detected