[][src]Function mime_multipart::read_multipart_body

pub fn read_multipart_body<S: Read>(
    stream: &mut S,
    headers: &Headers,
    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 you have the Headers already and the stream starts at the body. If the headers are still in the stream, use read_multipart() instead.