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.