MCPcopy Create free account
hub / github.com/Eeive/Evcode-ide / create_snapshot

Method create_snapshot

src/snap.rs:31–38  ·  view source on GitHub ↗
(&mut self, path: &str, content: &str)

Source from the content-addressed store, hash-verified

29 }
30
31 pub fn create_snapshot(&mut self, path: &str, content: &str) {
32 self.snapshots.insert(
33 path.to_string(),
34 Snapshot {
35 content: content.to_string(),
36 },
37 );
38 }
39
40 pub fn rollback(&self, path: &str) -> Option<String> {
41 self.snapshots.get(path).map(|s| s.content.clone())

Callers 1

handle_keyMethod · 0.80

Calls 1

to_stringMethod · 0.80

Tested by

no test coverage detected