From 6ed59567fc1862c02005eaf80b0d3c4821c2815b Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Wed, 5 Sep 2018 20:57:47 -0400 Subject: Remove documentation stuff; point to docs.rs --- target/doc/mailparse/fn.parse_mail.html | 161 -------------------------------- 1 file changed, 161 deletions(-) delete mode 100644 target/doc/mailparse/fn.parse_mail.html (limited to 'target/doc/mailparse/fn.parse_mail.html') diff --git a/target/doc/mailparse/fn.parse_mail.html b/target/doc/mailparse/fn.parse_mail.html deleted file mode 100644 index a14735a..0000000 --- a/target/doc/mailparse/fn.parse_mail.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - - - mailparse::parse_mail - Rust - - - - - - - - - - - - - - - - - - - -
- -
-
- - - -

Function mailparse::parse_mail - - [] - - [src]

pub fn parse_mail(raw_data: &[u8]) -> Result<ParsedMail, MailParseError>

The main mail-parsing entry point. -This function takes the raw data making up the message body and returns a -structured version of it, which allows easily accessing the header and body -information as needed.

-

Examples

-
-    use mailparse::*;
-    let parsed = parse_mail(concat!(
-            "Subject: This is a test email\n",
-            "Content-Type: multipart/alternative; boundary=foobar\n",
-            "Date: Sun, 02 Oct 2016 07:06:22 -0700 (PDT)\n",
-            "\n",
-            "--foobar\n",
-            "Content-Type: text/plain; charset=utf-8\n",
-            "Content-Transfer-Encoding: quoted-printable\n",
-            "\n",
-            "This is the plaintext version, in utf-8. Proof by Euro: =E2=82=AC\n",
-            "--foobar\n",
-            "Content-Type: text/html\n",
-            "Content-Transfer-Encoding: base64\n",
-            "\n",
-            "PGh0bWw+PGJvZHk+VGhpcyBpcyB0aGUgPGI+SFRNTDwvYj4gdmVyc2lvbiwgaW4g \n",
-            "dXMtYXNjaWkuIFByb29mIGJ5IEV1cm86ICZldXJvOzwvYm9keT48L2h0bWw+Cg== \n",
-            "--foobar--\n",
-            "After the final boundary stuff gets ignored.\n").as_bytes())
-        .unwrap();
-    assert_eq!(parsed.headers.get_first_value("Subject").unwrap(),
-        Some("This is a test email".to_string()));
-    assert_eq!(parsed.subparts.len(), 2);
-    assert_eq!(parsed.subparts[0].get_body().unwrap(),
-        "This is the plaintext version, in utf-8. Proof by Euro: \u{20AC}");
-    assert_eq!(parsed.subparts[1].headers[1].get_value().unwrap(), "base64");
-    assert_eq!(parsed.subparts[1].ctype.mimetype, "text/html");
-    assert!(parsed.subparts[1].get_body().unwrap().starts_with("<html>"));
-    assert_eq!(dateparse(parsed.headers.get_first_value("Date").unwrap().unwrap().as_str()).unwrap(), 1475417182);
-
- - - - - - - - - - - - - \ No newline at end of file -- cgit v1.2.3