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

Method clear

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

Source from the content-addressed store, hash-verified

108 }
109
110 async fn clear(&mut self, resource: Resource<Connection>) -> Result<(), wasmtime::Error> {
111 let large_string = self.resource_table.get_mut(&resource)?;
112 large_string.storage.clear();
113 Ok(())
114 }
115
116 async fn drop(&mut self, resource: Resource<Connection>) -> Result<()> {
117 let _ = self.resource_table.delete(resource)?;

Callers

nothing calls this directly

Calls 2

OkFunction · 0.85
get_mutMethod · 0.45

Tested by

no test coverage detected