diff options
Diffstat (limited to 'crates/types/src')
| -rw-r--r-- | crates/types/src/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/types/src/lib.rs b/crates/types/src/lib.rs index ad82bd4..4895418 100644 --- a/crates/types/src/lib.rs +++ b/crates/types/src/lib.rs @@ -245,6 +245,12 @@ pub enum ValType { ExternRef, } +impl ValType { + pub fn default_value(&self) -> WasmValue { + WasmValue::default_for(*self) + } +} + /// A WebAssembly External Kind. /// /// See <https://webassembly.github.io/spec/core/syntax/types.html#external-types> |
