One row reconstructed from the wire's per-entry classification — the routed twin of [`compute_row`]: the handler computed the kind/status/about columns and the attestation/verifies state with the same domain logic, so the row maps straight off the wire columns.
(entry: &atomic_client::proto::VaultEntry)
| 391 | /// kind/status/about columns and the attestation/verifies state with the |
| 392 | /// same domain logic, so the row maps straight off the wire columns. |
| 393 | pub(crate) fn wire_row(entry: &atomic_client::proto::VaultEntry) -> Row { |
| 394 | let attested = match entry.attested.as_deref() { |
| 395 | Some("fresh") => Attested::Fresh, |
| 396 | Some("stale") => Attested::Stale, |
| 397 | _ => Attested::None, |
| 398 | }; |
| 399 | let verifies = match entry.verifies.as_deref() { |
| 400 | Some("yes") => Verifies::Yes, |
| 401 | Some("no") => Verifies::No, |
| 402 | _ => Verifies::Na, |
| 403 | }; |
| 404 | Row { |
| 405 | id: entry.id.clone(), |
| 406 | kind: entry.memory_kind.clone().unwrap_or_else(|| NA.to_string()), |
| 407 | status: entry |
| 408 | .memory_status |
| 409 | .clone() |
| 410 | .unwrap_or_else(|| NA.to_string()), |
| 411 | about: entry.about_count.unwrap_or(0) as usize, |
| 412 | attested, |
| 413 | verifies, |
| 414 | updated: entry.updated_at_label.clone().unwrap_or_default(), |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | impl Command for MemoryList { |
| 419 | fn run(&self) -> CliResult<()> { |