Defines instantiations of the module `m` within this linker under the given `name`.
| 95 | /// Defines instantiations of the module `m` within this linker under the |
| 96 | /// given `name`. |
| 97 | Result<std::monostate> module(Store::Context cx, std::string_view name, |
| 98 | const Module &m) { |
| 99 | auto *error = wasmtime_linker_module(ptr.get(), cx.ptr, name.data(), |
| 100 | name.size(), m.capi()); |
| 101 | if (error != nullptr) { |
| 102 | return Error(error); |
| 103 | } |
| 104 | return std::monostate(); |
| 105 | } |
| 106 | |
| 107 | /// Attempts to load the specified named item from this linker, returning |
| 108 | /// `std::nullopt` if it was not defined. |