Trait JsonCastable

Source
pub trait JsonCastable<T> { }
Expand description

Marker trait for restricting the types Raw::deserialize_as, Raw::cast and Raw::cast_ref can be called with.

Implementing this trait for a type U means that it is safe to cast from U to T because T can be deserialized from the same JSON as U.

Implementors§

Source§

impl<T> JsonCastable<CanonicalJsonValue> for T

Available on crate feature canonical-json only.
Source§

impl<T> JsonCastable<Value> for T

Source§

impl<T> JsonCastable<BTreeMap<String, CanonicalJsonValue>> for T

Available on crate feature canonical-json only.