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

Function project_register

atomic-core/src/output/attribute.rs:157–171  ·  view source on GitHub ↗
(
    name: InodeAttrName,
    events: &[InodeAttrEvent],
    projection: &mut InodeAttributeProjection,
    apply: impl FnOnce(&mut InodeMaterialization, InodeAttr),
)

Source from the content-addressed store, hash-verified

155}
156
157fn project_register(
158 name: InodeAttrName,
159 events: &[InodeAttrEvent],
160 projection: &mut InodeAttributeProjection,
161 apply: impl FnOnce(&mut InodeMaterialization, InodeAttr),
162) {
163 match events {
164 [] => {}
165 [event] => apply(&mut projection.materialization, event.value),
166 events => projection.conflicts.push(InodeAttributeConflict {
167 name,
168 events: events.to_vec(),
169 }),
170 }
171}
172
173#[cfg(test)]
174mod tests {

Callers 1

project_inode_attributesFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected