4个版本
0.1.3 | 2020年1月16日 |
---|---|
0.1.2 | 2020年1月10日 |
0.1.1 | 2019年12月27日 |
0.1.0 | 2019年12月26日 |
#307 in 电子邮件
27 每月下载量
在 2 crate 中使用
11KB
216 行
邮件提取器
一个用于从MIME类型文件中提取文件的Rust库,返回一个包含文件名及其对应文件内容的字节数组的哈希表。
如何使用
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
}
在 Cargo.toml 中添加依赖项
[dependencies]
mail_extractor = "0.1.2"
lib.rs
:
邮件提取器
Mail_extractor
是一个用于从MIME类型文件中提取文件的Rust库,返回一个包含文件名及其对应文件内容的字节数组的哈希表。
示例
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
}
- 重写文件并返回其对应文件内容的字节数组。
依赖项
~12MB
~275K SLoC