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

Method classify

atomic-repository/src/repository/snapshot.rs:106–128  ·  view source on GitHub ↗
(&self, change: Change)

Source from the content-addressed store, hash-verified

104 }
105
106 pub(super) fn classify(&self, change: Change) -> Result<Change, RecordError> {
107 let (kind, supersedes) = match self {
108 Self::Durable | Self::Promotion { .. } => (ChangeKind::Durable, None),
109 Self::Snapshot {
110 working_copy,
111 supersedes,
112 ..
113 } => (
114 ChangeKind::Snapshot {
115 working_copy: *working_copy,
116 },
117 *supersedes,
118 ),
119 };
120 change
121 .with_classification(
122 kind,
123 supersedes,
124 ChangeOrigin::Native,
125 CausalFrontier::empty(),
126 )
127 .map_err(|error| RecordError::ChangeStore(error.to_string()))
128 }
129
130 pub(super) fn verify_promotion_content(
131 &self,

Callers 2

read_receiptFunction · 0.80
record_with_lifecycleMethod · 0.80

Calls 2

with_classificationMethod · 0.80
ChangeStoreClass · 0.50

Tested by

no test coverage detected