This crate provides methods for converting from the Value enum into many native Rust types. These conversions are generally done these with the From trait, for example From<Value> for u64. However, such conversions are not infallible. Instead, should the Value variant not be convertible to T, the crate chooses to panic. The preferred approach in this case is to use TryFrom, which allows the crate's consumer to decide how to handle failures.
I'm happy to help add the relevant TryFrom implementations, but I would defer to the author as to how to handle the existing From implementations.
This crate provides methods for converting from the
Value
enum into many native Rust types. These conversions are generally done these with theFrom
trait, for exampleFrom<Value> for u64
. However, such conversions are not infallible. Instead, should theValue
variant not be convertible toT
, the crate chooses to panic. The preferred approach in this case is to useTryFrom
, which allows the crate's consumer to decide how to handle failures.I'm happy to help add the relevant
TryFrom
implementations, but I would defer to the author as to how to handle the existingFrom
implementations.