Function holochain::prelude::dependencies::kitsune_p2p_types::dependencies::lair_keystore_api::dependencies::hc_seed_bundle::dependencies::rmpv::ext::to_value
pub fn to_value<T>(value: T) -> Result<Value, Error>where
T: Serialize,
Expand description
Convert a T
into rmpv::Value
which is an enum that can represent any valid MessagePack data.
This conversion can fail if T
’s implementation of Serialize
decides to fail.
let val = rmpv::ext::to_value("John Smith").unwrap();
assert_eq!(Value::String("John Smith".into()), val);