Skip to main content

encode

Function encode 

Source
pub fn encode<T: Serialize>(v: &T) -> Result<Vec<u8>>
Expand description

Length-prefixed CBOR (u32 big-endian length, then the item). For a raw stream; Node::request already frames Envelope as CBOR through libp2p.