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

Method resource_type

crates/wasmtime/src/runtime/component/matching.rs:204–212  ·  view source on GitHub ↗
(&self, index: TypeResourceTableIndex)

Source from the content-addressed store, hash-verified

202 }
203
204 pub fn resource_type(&self, index: TypeResourceTableIndex) -> ResourceType {
205 match self.types[index] {
206 TypeResourceTable::Concrete { ty, .. } => self
207 .resources
208 .and_then(|t| t.get(ty).copied())
209 .unwrap_or_else(|| ResourceType::uninstantiated(&self.types, ty)),
210 TypeResourceTable::Abstract(ty) => ResourceType::abstract_(&self.types, ty),
211 }
212 }
213
214 pub fn future_type(&self, index: TypeFutureTableIndex) -> FutureType {
215 FutureType::from(self.types[index].ty, self)

Callers 2

get_resourceMethod · 0.45
fromMethod · 0.45

Calls 2

copiedMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected