pub fn to_string(val: &impl WasmValue) -> Result<String, WriterError>
Expand description
Returns the given WasmValue
as a WAVE-encoded string.
use wasmtime::component::Val;
let wave_str = wasm_wave::to_string(&Val::Char('\u{1F44B}'))?;
assert_eq!(wave_str, "'๐'");