Skip to main content

encode_envelope

Function encode_envelope 

Source
pub fn encode_envelope(envelope: &DigMessageEnvelope) -> Result<Vec<u8>>
Expand description

Serialize an envelope to its on-wire bytes, enforcing the MAX_ENVELOPE_BYTES cap (SPEC §1).

§Errors

MessageError::EnvelopeTooLarge if the frame exceeds the cap; MessageError::Codec on a serialization failure.