pub fn scan_inline_yencode(
raw: &[u8],
part: &ParsedPart,
) -> Vec<InlineYEncBlock>Expand description
Scan a MIME part’s body for inline yEnc-encoded blocks.
Slices raw using part.body_range to obtain the body bytes, then finds
every =ybegin…=yend block within the body, decoding each one via
yencoding::decode. Returns one InlineYEncBlock per block found.
§Parameters
raw— the full raw message bytes (same buffer passed toparse()).part— aParsedPartfrom the parsed tree. Onlypart.body_rangeis used.
§Return value
An empty Vec when:
- the body contains no
=ybeginblocks, or part.body_rangeis out of bounds forraw.
Otherwise one entry per block, in order of appearance.
§Multiple blocks
A single body part may contain more than one yEnc article (though this is unusual in practice). All blocks are decoded and returned.
§Notes
- Byte offsets in the returned blocks are absolute — relative to the start
of
raw, matching the coordinate space ofpart.body_range. - No panic on any input.