Expand description

Tools to unpack a Value to something we can use.

Conversion is fallible, so try_unpack returns the Value if it is not of the correct type.

Usage

use rmpv::Value;
use nvim_rs::rpc::unpack::TryUnpack;

let v = Value::from("hoodle");
let s:String = v.try_unpack().unwrap();

assert_eq!(String::from("hoodle"), s);

Traits

Trait to allow seamless conversion from a Value to the type it contains. In particular, this should never panic.