Skip to main content

encoded_prefix

Function encoded_prefix 

Source
pub fn encoded_prefix(
    filename: Option<&str>,
    mime_type: &str,
    content_len: u64,
) -> Vec<u8> ⓘ
Expand description

Encode the protobuf fields before the attachment content.

Map entries use sorted keys, so the same inputs produce the same bytes. Task 10 must compute this prefix once per creation and reuse those bytes. The caller writes exactly content_len content bytes after this prefix.