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

Function change_info

libatomic/src/daemon/services.rs:1028–1052  ·  view source on GitHub ↗

Minimal wire render of a stored change (hash, message, authors, timestamp) — the record-response shape.

(
    change: &atomic_core::change::Change,
    hash: &atomic_core::types::Merkle,
)

Source from the content-addressed store, hash-verified

1026/// Minimal wire render of a stored change (hash, message, authors,
1027/// timestamp) — the record-response shape.
1028fn change_info(
1029 change: &atomic_core::change::Change,
1030 hash: &atomic_core::types::Merkle,
1031) -> ChangeInfo {
1032 ChangeInfo {
1033 hash: Some(hash_proto(hash)),
1034 message: Some(change.hashed.header.message.clone()),
1035 description: change.hashed.header.description.clone(),
1036 authors: change
1037 .hashed
1038 .header
1039 .authors
1040 .iter()
1041 .map(author_proto)
1042 .collect(),
1043 recorded_at: Some(timestamp_proto(change.hashed.header.timestamp)),
1044 dependencies: Vec::new(),
1045 graph_section_count: 0,
1046 semantic_section_count: 0,
1047 content_chunk_count: 0,
1048 has_provenance: change.has_provenance(),
1049 has_unhashed: change.unhashed.is_some(),
1050 has_signature: change.signature.is_some(),
1051 }
1052}
1053
1054/// The hash-only report entry for a change the listing could not load —
1055/// the local previews print the hash alone in that case, never an error.

Callers 3

preview_mutationMethod · 0.85
reviseMethod · 0.85
insert_changesMethod · 0.85

Calls 6

hash_protoFunction · 0.70
timestamp_protoFunction · 0.70
cloneMethod · 0.45
collectMethod · 0.45
iterMethod · 0.45
has_provenanceMethod · 0.45

Tested by

no test coverage detected