pub fn encode(envelope: &ValueEnvelope) -> Vec<u8> ⓘExpand description
Encode an envelope to binary format (MessagePack)
This is the primary serialization format for performance-critical paths like REPL communication and fchart interop.
Uses named encoding (MessagePack map format) for better compatibility and forward/backward compatibility with schema changes.
§Example
use shape_wire::{encode, ValueEnvelope};
let env = ValueEnvelope::number(42.0);
let bytes = encode(&env);
assert!(!bytes.is_empty());