Print the change in the configured format.
(
&self,
change: &Change,
hash: &Hash,
sequence: Option<u64>,
data: &ChangeRenderData,
)
| 391 | |
| 392 | /// Print the change in the configured format. |
| 393 | pub(crate) fn print_change( |
| 394 | &self, |
| 395 | change: &Change, |
| 396 | hash: &Hash, |
| 397 | sequence: Option<u64>, |
| 398 | data: &ChangeRenderData, |
| 399 | ) { |
| 400 | let output = match self.format { |
| 401 | ChangeFormat::Default => self.format_default(change, hash, sequence, data), |
| 402 | ChangeFormat::Short => self.format_short(change, hash, sequence), |
| 403 | ChangeFormat::Json => { |
| 404 | let ledger = self.load_json_ledger(&data.ledger_graphs); |
| 405 | self.format_json(change, hash, sequence, ledger) |
| 406 | } |
| 407 | }; |
| 408 | print!("{}", output); |
| 409 | } |
| 410 | } |
| 411 | |
| 412 | /// Extract a human-readable one-liner from a provenance node's detail JSON. |
no test coverage detected