use neovim::message_serde::Message; use rmp_serde::{Deserializer, Serializer}; use serde::*; #[tokio::main] async fn main() { let mut buf = Vec::new(); let val: Message = Message::Request { id: 0, method: "test".to_string(), params: rmpv::Value::Nil, }; val.serialize(&mut Serializer::new(&mut buf)).unwrap(); dbg!(&buf); let a = rmp_serde::from_slice::(&buf[..]); dbg!(a); // let bb: &[u8] = // b"9302a6726564726177dc0005dc0002ae7461626c696e655f75706461746594d402019182a3746162d40201a46e616d65b36578616d706c65732f73696d706c652e6c7561d400019182a6627566666572d40001a46e616d65b36578616d706c65732f73696d706c652e6c7561dc0004a9677269645f6c696e6594020000dc001592a1690091a17691a16991a16d91a12e91a16f91a17091a17491a12e91a16591a16d91a16f91a16a91a16991a12092a13d3492a1200092a1743291a17291a17591a16594012715dc000692a12b5a91a15d91a15b91a15291a14f91a15d94012740dc000192a1325adc0002ac77696e5f76696577706f72749802c70301cd03e8000300010200dc0002b0677269645f637572736f725f676f746f93020001dc0002a5666c75736890"; }