4 releases
0.1.3 | Jan 16, 2020 |
---|---|
0.1.2 | Jan 10, 2020 |
0.1.1 | Dec 27, 2019 |
0.1.0 | Dec 26, 2019 |
#333 in Email
Used in 2 crates
11KB
216 lines
Mail Extractor
A Rust library to extract files from MIME type files and returns you a hashmap which will contain filename and it corresponding file content as bytes.
How to use
use std::collections::HashMap;
use mail_extractor;
fn get_files(file_stream: Vec<u8>) -> HashMap<String, Vec<u8>> {
let extracted_file: HashMap<String, Vec<u8>> = mail_extractor::rewrite(file_stream);
extracted_file
}
Add the dependency in Cargo.toml
[dependencies]
mail_extractor = "0.1.2"
lib.rs
:
Mail Extractor
Mail_extractor
is a Rust library to extract files
from MIME type files and returns you a hashmap
which will contain filename and it corresponding file content as bytes.
Example
use std::collections::HashMap;
use mail_extractor;
fn get_files(file_stream: Vec<u8>) -> HashMap<String, Vec<u8>> {
let extracted_file: HashMap<String, Vec<u8>> = mail_extractor::rewrite(file_stream);
extracted_file
}
- Rewrites file and returns it's corresponding file content as bytes.
Dependencies
~12MB
~282K SLoC