Function from_str
pub fn from_str<V>(
ty: &<V as WasmValue>::Type,
s: &str,
) -> Result<V, ParserError>where
V: WasmValue,
Expand description
Parses a WasmValue
from the given WAVE-encoded string.
use wasm_wave::{wasm::WasmValue, value::{Type, Value}};
let val: Value = wasm_wave::from_str(&Type::CHAR, r"'\u{1F44B}'")?;
assert_eq!(val, Value::make_char('👋'));