The Hash40 type from the hash40 crate implements the Deserialize trait from serde, given the crate's serde feature is enabled. Requiring the user to specify the hash of their desired ui_bgm_id value is unintuitive.
With the Hash40 type, the user can specify a string (i.e., the label of the given ui_bgm_id value) and the Deserialize trait implementation will automatically hash the string received. If your API calls require a u64 value as an argument, you can easily access the inner u64 value of the Hash40 as the field is public.
The
Hash40
type from the hash40 crate implements theDeserialize
trait from serde, given the crate'sserde
feature is enabled. Requiring the user to specify the hash of their desiredui_bgm_id
value is unintuitive.With the
Hash40
type, the user can specify a string (i.e., the label of the givenui_bgm_id
value) and theDeserialize
trait implementation will automatically hash the string received. If your API calls require au64
value as an argument, you can easily access the inneru64
value of theHash40
as the field is public.