Function mime_multipart::read_multipart [] [src]

pub fn read_multipart<S: Read>(stream: &mut S, always_use_files: bool) -> Result<Vec<Node>, Error>

Parse a MIME multipart/* from a Readable stream into a Vec of Nodes, streaming files to disk and keeping the rest in memory. Recursive multipart/* parts will are parsed as well and returned within a Node::Multipart variant.

If always_use_files is true, all parts will be streamed to files. If false, only parts with a ContentDisposition header set to Attachment or otherwise containing a Filename parameter will be streamed to files.

It is presumed that the headers are still in the stream. If you have them separately, use parse_multipart_body() instead.