pub fn write_named<T: Serialize>(
w: &mut impl Write,
wire: Wire,
msg: &T,
) -> Result<()>Expand description
Write one message with MessagePack structs as maps keyed by field name (what the host sends a plugin). A plugin built before a field was added skips the unknown key; as an array the extra element made its decoder fail (“array had incorrect length”) and the plugin exit at the handshake. Plugins built from any mode-api version read both shapes.