From 42a5e14da5fdff58f9b668f7fc6fd6fd1b39f770 Mon Sep 17 00:00:00 2001
From: Kartikaya Gupta
Date: Mon, 26 Dec 2016 09:14:43 -0500
Subject: Update documentation
---
target/doc/implementors/core/convert/trait.From.js | 2 +-
target/doc/implementors/core/fmt/trait.Debug.js | 2 +-
target/doc/implementors/core/fmt/trait.Display.js | 2 +-
.../implementors/mailparse/trait.MailHeaderMap.js | 2 +-
target/doc/implementors/std/error/trait.Error.js | 2 +-
target/doc/mailparse/MailHeader.t.html | 10 +
target/doc/mailparse/MailHeaderMap.t.html | 10 +
target/doc/mailparse/MailParseError.t.html | 10 +
target/doc/mailparse/ParsedContentType.t.html | 10 +
target/doc/mailparse/ParsedMail.t.html | 10 +
target/doc/mailparse/dateparse.v.html | 10 +
target/doc/mailparse/dateparse/dateparse.v.html | 10 +
target/doc/mailparse/enum.MailParseError.html | 43 +-
target/doc/mailparse/fn.dateparse.html | 8 +-
target/doc/mailparse/fn.parse_content_type.html | 19 +-
target/doc/mailparse/fn.parse_header.html | 8 +-
target/doc/mailparse/fn.parse_headers.html | 8 +-
target/doc/mailparse/fn.parse_mail.html | 8 +-
target/doc/mailparse/index.html | 24 +-
target/doc/mailparse/parse_content_type.v.html | 10 +
target/doc/mailparse/parse_header.v.html | 10 +
target/doc/mailparse/parse_headers.v.html | 10 +
target/doc/mailparse/parse_mail.v.html | 10 +
target/doc/mailparse/struct.MailHeader.html | 21 +-
target/doc/mailparse/struct.ParsedContentType.html | 34 +-
target/doc/mailparse/struct.ParsedMail.html | 48 +-
target/doc/mailparse/trait.MailHeaderMap.html | 18 +-
target/doc/main.css | 18 +-
target/doc/main.js | 35 +-
target/doc/playpen.js | 15 +-
target/doc/rustdoc.css | 131 +-
target/doc/search-index.js | 2 +-
target/doc/src/mailparse/src/dateparse.rs.html | 4 +-
target/doc/src/mailparse/src/lib.rs.html | 2090 ++++++++++----------
target/doc/src/mailparse/src/macros.rs.html | 2 +
35 files changed, 1509 insertions(+), 1147 deletions(-)
create mode 100644 target/doc/mailparse/MailHeader.t.html
create mode 100644 target/doc/mailparse/MailHeaderMap.t.html
create mode 100644 target/doc/mailparse/MailParseError.t.html
create mode 100644 target/doc/mailparse/ParsedContentType.t.html
create mode 100644 target/doc/mailparse/ParsedMail.t.html
create mode 100644 target/doc/mailparse/dateparse.v.html
create mode 100644 target/doc/mailparse/dateparse/dateparse.v.html
create mode 100644 target/doc/mailparse/parse_content_type.v.html
create mode 100644 target/doc/mailparse/parse_header.v.html
create mode 100644 target/doc/mailparse/parse_headers.v.html
create mode 100644 target/doc/mailparse/parse_mail.v.html
diff --git a/target/doc/implementors/core/convert/trait.From.js b/target/doc/implementors/core/convert/trait.From.js
index 305696c..b8ae2d3 100644
--- a/target/doc/implementors/core/convert/trait.From.js
+++ b/target/doc/implementors/core/convert/trait.From.js
@@ -1,5 +1,5 @@
(function() {var implementors = {};
-implementors['mailparse'] = ["impl From<QuotedPrintableError> for MailParseError","impl From<Base64Error> for MailParseError","impl From<Cow<'static, str>> for MailParseError",];implementors['mailparse'] = ["impl From<QuotedPrintableError> for MailParseError","impl From<Base64Error> for MailParseError","impl From<Cow<'static, str>> for MailParseError",];implementors['mailparse'] = ["impl From<QuotedPrintableError> for MailParseError","impl From<Base64Error> for MailParseError","impl From<Cow<'static, str>> for MailParseError",];implementors['mailparse'] = ["impl From<QuotedPrintableError> for MailParseError","impl From<Base64Error> for MailParseError","impl From<Cow<'static, str>> for MailParseError",];implementors['mailparse'] = ["impl From<QuotedPrintableError> for MailParseError","impl From<Base64Error> for MailParseError","impl From<Cow<'static, str>> for MailParseError",];
+implementors['mailparse'] = ["impl From<QuotedPrintableError> for MailParseError","impl From<Base64Error> for MailParseError","impl From<Cow<'static, str>> for MailParseError",];implementors['mailparse'] = ["impl From<QuotedPrintableError> for MailParseError","impl From<Base64Error> for MailParseError","impl From<Cow<'static, str>> for MailParseError",];implementors['mailparse'] = ["impl From<QuotedPrintableError> for MailParseError","impl From<Base64Error> for MailParseError","impl From<Cow<'static, str>> for MailParseError",];implementors['mailparse'] = ["impl From<QuotedPrintableError> for MailParseError","impl From<Base64Error> for MailParseError","impl From<Cow<'static, str>> for MailParseError",];implementors['mailparse'] = ["impl From<QuotedPrintableError> for MailParseError","impl From<Base64Error> for MailParseError","impl From<Cow<'static, str>> for MailParseError",];implementors["mailparse"] = ["impl From<QuotedPrintableError> for MailParseError","impl From<Base64Error> for MailParseError","impl From<Cow<'static, str>> for MailParseError",];
if (window.register_implementors) {
window.register_implementors(implementors);
diff --git a/target/doc/implementors/core/fmt/trait.Debug.js b/target/doc/implementors/core/fmt/trait.Debug.js
index d493bf2..544397d 100644
--- a/target/doc/implementors/core/fmt/trait.Debug.js
+++ b/target/doc/implementors/core/fmt/trait.Debug.js
@@ -1,5 +1,5 @@
(function() {var implementors = {};
-implementors['mailparse'] = ["impl Debug for MailParseError","impl<'a> Debug for MailHeader<'a>","impl Debug for ParsedContentType","impl<'a> Debug for ParsedMail<'a>",];implementors['mailparse'] = ["impl Debug for MailParseError","impl<'a> Debug for MailHeader<'a>","impl Debug for ParsedContentType","impl<'a> Debug for ParsedMail<'a>",];implementors['mailparse'] = ["impl Debug for MailParseError","impl<'a> Debug for MailHeader<'a>","impl Debug for ParsedContentType","impl<'a> Debug for ParsedMail<'a>",];implementors['mailparse'] = ["impl Debug for MailParseError","impl<'a> Debug for MailHeader<'a>","impl Debug for ParsedContentType","impl<'a> Debug for ParsedMail<'a>",];implementors['mailparse'] = ["impl Debug for MailParseError","impl<'a> Debug for MailHeader<'a>","impl Debug for ParsedContentType","impl<'a> Debug for ParsedMail<'a>",];
+implementors['mailparse'] = ["impl Debug for MailParseError","impl<'a> Debug for MailHeader<'a>","impl Debug for ParsedContentType","impl<'a> Debug for ParsedMail<'a>",];implementors['mailparse'] = ["impl Debug for MailParseError","impl<'a> Debug for MailHeader<'a>","impl Debug for ParsedContentType","impl<'a> Debug for ParsedMail<'a>",];implementors['mailparse'] = ["impl Debug for MailParseError","impl<'a> Debug for MailHeader<'a>","impl Debug for ParsedContentType","impl<'a> Debug for ParsedMail<'a>",];implementors['mailparse'] = ["impl Debug for MailParseError","impl<'a> Debug for MailHeader<'a>","impl Debug for ParsedContentType","impl<'a> Debug for ParsedMail<'a>",];implementors['mailparse'] = ["impl Debug for MailParseError","impl<'a> Debug for MailHeader<'a>","impl Debug for ParsedContentType","impl<'a> Debug for ParsedMail<'a>",];implementors["mailparse"] = ["impl Debug for MailParseError","impl<'a> Debug for MailHeader<'a>","impl Debug for ParsedContentType","impl<'a> Debug for ParsedMail<'a>",];
if (window.register_implementors) {
window.register_implementors(implementors);
diff --git a/target/doc/implementors/core/fmt/trait.Display.js b/target/doc/implementors/core/fmt/trait.Display.js
index 462a037..fcbb3d8 100644
--- a/target/doc/implementors/core/fmt/trait.Display.js
+++ b/target/doc/implementors/core/fmt/trait.Display.js
@@ -1,5 +1,5 @@
(function() {var implementors = {};
-implementors['mailparse'] = ["impl Display for MailParseError",];implementors['mailparse'] = ["impl Display for MailParseError",];implementors['mailparse'] = ["impl Display for MailParseError",];implementors['mailparse'] = ["impl Display for MailParseError",];implementors['mailparse'] = ["impl Display for MailParseError",];
+implementors['mailparse'] = ["impl Display for MailParseError",];implementors['mailparse'] = ["impl Display for MailParseError",];implementors['mailparse'] = ["impl Display for MailParseError",];implementors['mailparse'] = ["impl Display for MailParseError",];implementors['mailparse'] = ["impl Display for MailParseError",];implementors["mailparse"] = ["impl Display for MailParseError",];
if (window.register_implementors) {
window.register_implementors(implementors);
diff --git a/target/doc/implementors/mailparse/trait.MailHeaderMap.js b/target/doc/implementors/mailparse/trait.MailHeaderMap.js
index eaccbf0..200716c 100644
--- a/target/doc/implementors/mailparse/trait.MailHeaderMap.js
+++ b/target/doc/implementors/mailparse/trait.MailHeaderMap.js
@@ -1,5 +1,5 @@
(function() {var implementors = {};
-implementors['mailparse'] = [];implementors['mailparse'] = [];implementors['mailparse'] = [];implementors['mailparse'] = [];implementors['mailparse'] = [];
+implementors['mailparse'] = [];implementors['mailparse'] = [];implementors['mailparse'] = [];implementors['mailparse'] = [];implementors['mailparse'] = [];implementors["mailparse"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
diff --git a/target/doc/implementors/std/error/trait.Error.js b/target/doc/implementors/std/error/trait.Error.js
index f26b956..5335fb5 100644
--- a/target/doc/implementors/std/error/trait.Error.js
+++ b/target/doc/implementors/std/error/trait.Error.js
@@ -1,5 +1,5 @@
(function() {var implementors = {};
-implementors['mailparse'] = ["impl Error for MailParseError",];implementors['mailparse'] = ["impl Error for MailParseError",];implementors['mailparse'] = ["impl Error for MailParseError",];implementors['mailparse'] = ["impl Error for MailParseError",];implementors['mailparse'] = ["impl Error for MailParseError",];
+implementors['mailparse'] = ["impl Error for MailParseError",];implementors['mailparse'] = ["impl Error for MailParseError",];implementors['mailparse'] = ["impl Error for MailParseError",];implementors['mailparse'] = ["impl Error for MailParseError",];implementors['mailparse'] = ["impl Error for MailParseError",];implementors["mailparse"] = ["impl Error for MailParseError",];
if (window.register_implementors) {
window.register_implementors(implementors);
diff --git a/target/doc/mailparse/MailHeader.t.html b/target/doc/mailparse/MailHeader.t.html
new file mode 100644
index 0000000..1d344a8
--- /dev/null
+++ b/target/doc/mailparse/MailHeader.t.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+ Redirecting to struct.MailHeader.html...
+
+
+
\ No newline at end of file
diff --git a/target/doc/mailparse/MailHeaderMap.t.html b/target/doc/mailparse/MailHeaderMap.t.html
new file mode 100644
index 0000000..72171d6
--- /dev/null
+++ b/target/doc/mailparse/MailHeaderMap.t.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+ Redirecting to trait.MailHeaderMap.html...
+
+
+
\ No newline at end of file
diff --git a/target/doc/mailparse/MailParseError.t.html b/target/doc/mailparse/MailParseError.t.html
new file mode 100644
index 0000000..f9f054d
--- /dev/null
+++ b/target/doc/mailparse/MailParseError.t.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+ Redirecting to enum.MailParseError.html...
+
+
+
\ No newline at end of file
diff --git a/target/doc/mailparse/ParsedContentType.t.html b/target/doc/mailparse/ParsedContentType.t.html
new file mode 100644
index 0000000..2948f99
--- /dev/null
+++ b/target/doc/mailparse/ParsedContentType.t.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+ Redirecting to struct.ParsedContentType.html...
+
+
+
\ No newline at end of file
diff --git a/target/doc/mailparse/ParsedMail.t.html b/target/doc/mailparse/ParsedMail.t.html
new file mode 100644
index 0000000..f02e5af
--- /dev/null
+++ b/target/doc/mailparse/ParsedMail.t.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+ Redirecting to struct.ParsedMail.html...
+
+
+
\ No newline at end of file
diff --git a/target/doc/mailparse/dateparse.v.html b/target/doc/mailparse/dateparse.v.html
new file mode 100644
index 0000000..b3daddf
--- /dev/null
+++ b/target/doc/mailparse/dateparse.v.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+ Redirecting to fn.dateparse.html...
+
+
+
\ No newline at end of file
diff --git a/target/doc/mailparse/dateparse/dateparse.v.html b/target/doc/mailparse/dateparse/dateparse.v.html
new file mode 100644
index 0000000..b3daddf
--- /dev/null
+++ b/target/doc/mailparse/dateparse/dateparse.v.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+ Redirecting to fn.dateparse.html...
+
+
+
\ No newline at end of file
diff --git a/target/doc/mailparse/enum.MailParseError.html b/target/doc/mailparse/enum.MailParseError.html
index 9b438b4..068e2b8 100644
--- a/target/doc/mailparse/enum.MailParseError.html
+++ b/target/doc/mailparse/enum.MailParseError.html
@@ -47,31 +47,44 @@
[−]
- [src]
+ [src]
pub enum MailParseError {
QuotedPrintableDecodeError(QuotedPrintableError),
Base64DecodeError(Base64Error),
- EncodingError(Cow<'static, str>),
+ EncodingError(Cow<'static, str>),
Generic(&'static str),
}
An error type that represents the different kinds of errors that may be
encountered during message parsing.
Variants
-QuotedPrintableDecodeError | Data that was specified as being in the quoted-printable transfer-encoding
+QuotedPrintableDecodeError(QuotedPrintableError) Data that was specified as being in the quoted-printable transfer-encoding
could not be successfully decoded as quoted-printable data.
- | |
Base64DecodeError | Data that was specified as being in the base64 transfer-encoding could
+ Base64DecodeError(Base64Error) Data that was specified as being in the base64 transfer-encoding could
not be successfully decoded as base64 data.
- | |
EncodingError | An error occurred when converting the raw byte data to Rust UTF-8 string
+ EncodingError(Cow<'static, str>) An error occurred when converting the raw byte data to Rust UTF-8 string
format using the charset specified in the message.
- | |
Generic | Some other error occurred while parsing the message; the description string
+ Generic(&'static str) Some other error occurred while parsing the message; the description string
provides additional details.
- | |
Trait Implementations
Derived Implementations
+Trait Implementations
+
+
Formats the value using the given formatter.
+
+
+
Formats the value using the given formatter.
+
+
+
A short description of the error. Read more
+
+
The lower-level cause of this error, if any. Read more
+
+
+
Performs the conversion.
+
+
+
Performs the conversion.
+
+
+
Performs the conversion.
+
@@ -94,6 +107,8 @@ provides additional details.
Move down in search results
⏎
Go to active search result
+ +
+ Collapse/expand all sections
diff --git a/target/doc/mailparse/fn.dateparse.html b/target/doc/mailparse/fn.dateparse.html
index 1e9b15e..25f455c 100644
--- a/target/doc/mailparse/fn.dateparse.html
+++ b/target/doc/mailparse/fn.dateparse.html
@@ -47,15 +47,15 @@
[−]
- [src]
-pub fn dateparse(date: &str) -> Result<i64, &'static str>
Convert a date field from an email header into a UNIX epoch timestamp.
+ [src]
+
pub fn dateparse(date: &str) -> Result<i64, &'static str>
Convert a date field from an email header into a UNIX epoch timestamp.
This function handles the most common formatting of date fields found in
email headers. It may fail to parse some of the more creative formattings.
use mailparse::dateparse;
- assert_eq!(dateparse("Sun, 02 Oct 2016 07:06:22 -0700 (PDT)").unwrap(), 1475417182);
+
assert_eq!(
dateparse(
"Sun, 02 Oct 2016 07:06:22 -0700 (PDT)").
unwrap(),
1475417182);
Run
@@ -79,6 +79,8 @@ email headers. It may fail to parse some of the more creative formattings.
Move down in search results
⏎
Go to active search result
+
+
+
Collapse/expand all sections
diff --git a/target/doc/mailparse/fn.parse_content_type.html b/target/doc/mailparse/fn.parse_content_type.html
index 7e4ed82..9470f28 100644
--- a/target/doc/mailparse/fn.parse_content_type.html
+++ b/target/doc/mailparse/fn.parse_content_type.html
@@ -47,8 +47,8 @@
[−]
- [src]
-pub fn parse_content_type(header: &str) -> Result<ParsedContentType, MailParseError>
Helper method to parse a header value as a Content-Type header. The charset
+ [src]
+
pub fn parse_content_type(header: &str) -> Result<ParsedContentType, MailParseError>
Helper method to parse a header value as a Content-Type header. The charset
defaults to "us-ascii" if no charset parameter is provided in the header
value.
@@ -61,7 +61,7 @@ value.
let ctype = parse_content_type(
&parsed.
get_value().
unwrap()).
unwrap();
assert_eq!(
ctype.
mimetype,
"text/html");
assert_eq!(
ctype.
charset,
"foo");
-
assert_eq!(
ctype.
boundary,
Some(
"quotes_are_removed".
to_string()));
+
assert_eq!(
ctype.
boundary,
Some(
"quotes_are_removed".
to_string()));
Run
use mailparse::{parse_header, parse_content_type};
@@ -69,7 +69,16 @@ value.
let ctype = parse_content_type(&parsed.get_value().unwrap()).unwrap();
assert_eq!(ctype.mimetype, "bogus");
assert_eq!(ctype.charset, "us-ascii");
- assert_eq!(ctype.boundary, None);
+
assert_eq!(
ctype.
boundary,
None);
Run
+
+
+ use mailparse::{parse_header, parse_content_type};
+ let (parsed, _) = parse_header(br#"Content-Type: application/octet-stream;name="=?utf8?B?6L+O5ai255m95a+M576O?=";charset="utf8""#).unwrap();
+ let ctype = parse_content_type(&parsed.get_value().unwrap()).unwrap();
+ assert_eq!(ctype.mimetype, "application/octet-stream");
+ assert_eq!(ctype.charset, "utf8");
+