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

Method new

atomic-repository/src/manifest.rs:115–129  ·  view source on GitHub ↗

Build a manifest from parts, computing the state from the log.

(
        name: impl Into<String>,
        scope: ViewScope,
        parent: Option<String>,
        changes: Vec<Hash>,
    )

Source from the content-addressed store, hash-verified

113
114 /// Build a manifest from parts, computing the state from the log.
115 pub fn new(
116 name: impl Into<String>,
117 scope: ViewScope,
118 parent: Option<String>,
119 changes: Vec<Hash>,
120 ) -> Self {
121 let state = Self::fold(&changes);
122 Self {
123 name: name.into(),
124 scope,
125 parent,
126 changes,
127 state,
128 }
129 }
130
131 /// Verify that the declared state equals the fold of the change log.
132 pub fn verify(&self) -> Result<(), ManifestError> {

Callers

nothing calls this directly

Calls 1

foldFunction · 0.85

Tested by

no test coverage detected