pub fn from_str<V: WasmValue>(ty: &V::Type, s: &str) -> Result<V, ParserError>
Expand description
Parses a WasmValue
from the given WAVE-encoded string.
use wasmtime::component::{Type, Val};
let val: Val = wasm_wave::from_str(&Type::Char, r"'\u{1F44B}'")?;
assert_eq!(val, Val::Char('๐'));