From 812c2776ca90e32e2d4f3d1d7a40299af2b749b8 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Sat, 18 Jun 2016 17:57:49 +0100 Subject: Add generated documentation --- target/doc/mailparse/struct.MailHeader.html | 135 ++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 target/doc/mailparse/struct.MailHeader.html (limited to 'target/doc/mailparse/struct.MailHeader.html') diff --git a/target/doc/mailparse/struct.MailHeader.html b/target/doc/mailparse/struct.MailHeader.html new file mode 100644 index 0000000..a5d1caa --- /dev/null +++ b/target/doc/mailparse/struct.MailHeader.html @@ -0,0 +1,135 @@ + + + + + + + + + + mailparse::MailHeader - Rust + + + + + + + + + + + + + + + + + +
+

Struct mailparse::MailHeader + + [] + + [src]

+
pub struct MailHeader<'a> {
+    // some fields omitted
+}

A struct that represents a single header in the message. +It holds slices into the raw byte array passed to parse_mail, and so the +lifetime of this struct must be contained within the lifetime of the raw +input. There are additional accessor functions on this struct to extract +the data as Rust strings.

+

Methods

impl<'a> MailHeader<'a>

fn get_key(&self) -> Result<String, MailParseError>

+

Get the name of the header. Note that header names are case-sensitive.

+

fn get_value(&self) -> Result<String, MailParseError>

+

Get the value of the header. Any sequences of newlines characters followed +by whitespace are collapsed into a single space. In effect, header values +wrapped across multiple lines are compacted back into one line, while +discarding the extra whitespace required by the MIME format. Additionally, +any quoted-printable words in the value are decoded.

+ +

Examples

+
+    use mailparse::parse_header;
+    let (parsed, _) = parse_header(b"Subject: =?iso-8859-1?Q?=A1Hola,_se=F1or!?=").unwrap();
+    assert_eq!(parsed.get_key().unwrap(), "Subject");
+    assert_eq!(parsed.get_value().unwrap(), "\u{a1}Hola, se\u{f1}or!");
+

Trait Implementations

Derived Implementations

impl<'a> Debug for MailHeader<'a>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+
+ + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3