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

Method from_export

crates/wasmtime/src/runtime/component/types.rs:1225–1238  ·  view source on GitHub ↗
(engine: &Engine, export: &Export, ty: &InstanceType<'_>)

Source from the content-addressed store, hash-verified

1223 }
1224 }
1225 pub(crate) fn from_export(engine: &Engine, export: &Export, ty: &InstanceType<'_>) -> Self {
1226 match export {
1227 Export::Instance { ty: idx, .. } => {
1228 Self::ComponentInstance(ComponentInstance::from(*idx, ty))
1229 }
1230 Export::LiftedFunction { ty: idx, .. } => {
1231 Self::ComponentFunc(ComponentFunc::from(*idx, ty))
1232 }
1233 Export::ModuleStatic { ty: idx, .. } | Export::ModuleImport { ty: idx, .. } => {
1234 Self::Module(Module::from(*idx, ty))
1235 }
1236 Export::Type(idx) => Self::from(engine, idx, ty),
1237 }
1238 }
1239}

Callers

nothing calls this directly

Calls 4

fromFunction · 0.85
ComponentFuncClass · 0.85
ComponentInstanceClass · 0.70
ModuleClass · 0.70

Tested by

no test coverage detected