The windows-registry crate is currently pretty strict when it comes to mapping registry values and types. You cannot for example read the bytes from a registry value unless the type of that value is REG_BINARY. This makes it a little difficult to gracefully deal with invalid registry values.
This update adds the get_type methods and the resulting Type enum so that the actual type of a value can be queried directly. It also updates the get_bytes method to support returning the raw byte value even if the type isn't known to be bytes.
The
windows-registry
crate is currently pretty strict when it comes to mapping registry values and types. You cannot for example read the bytes from a registry value unless the type of that value isREG_BINARY
. This makes it a little difficult to gracefully deal with invalid registry values.This update adds the
get_type
methods and the resultingType
enum so that the actual type of a value can be queried directly. It also updates theget_bytes
method to support returning the raw byte value even if the type isn't known to be bytes.Related: #3119