lann / wasm-wave

Web Assembly Value Encoding
Apache License 2.0
38 stars 6 forks source link

Make `value::Value` and `value::Type` newtypes. #8

Closed sunfishcode closed 11 months ago

sunfishcode commented 11 months ago

Change value::Value and value::Type from pub enums with arms that use private types, to a public newtype, making the actual enum private.

This makes the API easier to understand, as it fully hides types like SimpleType which are private.

https://docs.rs/wasm-wave/latest/wasm_wave/value/enum.Value.html https://docs.rs/wasm-wave/latest/wasm_wave/value/enum.Type.html