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

Function wire_row

atomic-cli/src/commands/memory/list.rs:393–416  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
393pub(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
418impl Command for MemoryList {
419 fn run(&self) -> CliResult<()> {

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected