ObjectValue as_* methods should return a Result
These methods currently panic when called on an unexpected variant. Instead these methods should return a Result
. This allows usage such as:
let string = some_pointer.get().value.as_string()?;
This in turn removes the need for the ensure_*!
macros.