MCPcopy Index your code
hub / github.com/endbasic/endbasic / put

Method put

std/src/storage/mem.rs:75–82  ·  view source on GitHub ↗
(&mut self, name: &str, content: &[u8])

Source from the content-addressed store, hash-verified

73 }
74
75 async fn put(&mut self, name: &str, content: &[u8]) -> io::Result<()> {
76 if let Some((prev_content, _readers)) = self.programs.get_mut(name) {
77 content.clone_into(prev_content);
78 return Ok(());
79 };
80 self.programs.insert(name.to_owned(), (content.to_owned(), HashSet::new()));
81 Ok(())
82 }
83
84 async fn update_acls(
85 &mut self,

Calls 2

get_mutMethod · 0.45
insertMethod · 0.45