Creates a new copy of `FooPre` bindings which can then be used to instantiate into a particular store. This method may fail if the component behind `instance_pre` does not have the required exports.
(
instance_pre: wasmtime::component::InstancePre<_T>,
)
| 25 | /// This method may fail if the component behind `instance_pre` |
| 26 | /// does not have the required exports. |
| 27 | pub fn new( |
| 28 | instance_pre: wasmtime::component::InstancePre<_T>, |
| 29 | ) -> wasmtime::Result<Self> { |
| 30 | let indices = FooIndices::new(&instance_pre)?; |
| 31 | Ok(Self { instance_pre, indices }) |
| 32 | } |
| 33 | pub fn engine(&self) -> &wasmtime::Engine { |
| 34 | self.instance_pre.engine() |
| 35 | } |
nothing calls this directly
no test coverage detected