MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / remove

Method remove

examples/resource-component/main.rs:101–108  ·  view source on GitHub ↗
(
        &mut self,
        resource: Resource<Connection>,
        key: String,
    )

Source from the content-addressed store, hash-verified

99 }
100
101 async fn remove(
102 &mut self,
103 resource: Resource<Connection>,
104 key: String,
105 ) -> Result<Option<String>> {
106 let connection = self.resource_table.get_mut(&resource)?;
107 Ok(connection.storage.remove(&key))
108 }
109
110 async fn clear(&mut self, resource: Resource<Connection>) -> Result<(), wasmtime::Error> {
111 let large_string = self.resource_table.get_mut(&resource)?;

Callers 1

ready_deadlinesMethod · 0.45

Calls 2

OkFunction · 0.85
get_mutMethod · 0.45

Tested by

no test coverage detected