One row reconstructed from the wire's per-entry classification — the routed twin of [`compute_row`]: the handler computed the effective kind and the attestation/verifies state with the same domain logic, so the row maps straight off the wire columns.
(entry: &atomic_client::proto::VaultEntry)
| 453 | /// and the attestation/verifies state with the same domain logic, so the |
| 454 | /// row maps straight off the wire columns. |
| 455 | pub(crate) fn wire_row(entry: &atomic_client::proto::VaultEntry) -> Row { |
| 456 | let attested = match entry.attested.as_deref() { |
| 457 | Some("fresh") => Attested::Fresh, |
| 458 | Some("stale") => Attested::Stale, |
| 459 | _ => Attested::None, |
| 460 | }; |
| 461 | let verifies = match entry.verifies.as_deref() { |
| 462 | Some("yes") => Verifies::Yes, |
| 463 | Some("no") => Verifies::No, |
| 464 | _ => Verifies::Na, |
| 465 | }; |
| 466 | Row { |
| 467 | human_key: entry.id.clone(), |
| 468 | title: entry.title.clone(), |
| 469 | status: entry |
| 470 | .status |
| 471 | .and_then(crate::commands::rpc::entry_status_label) |
| 472 | .unwrap_or_else(|| entry.status_label.clone().unwrap_or_default()), |
| 473 | kind: entry |
| 474 | .manifest_kind |
| 475 | .clone() |
| 476 | .unwrap_or_else(|| "feature".to_string()), |
| 477 | attested, |
| 478 | verifies, |
| 479 | } |
| 480 | } |
| 481 | |
| 482 | impl Command for IntentList { |
| 483 | fn run(&self) -> CliResult<()> { |