summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKartikaya Gupta <kats@seldon.staktrace.com>2017-10-14 00:16:08 -0400
committerKartikaya Gupta <kats@seldon.staktrace.com>2017-10-14 00:16:08 -0400
commited032333a1bde0498d46132609330a9f92a52ab1 (patch)
tree7deac9b2a92123de7f1985231632162bffebb36b
parent24a48fbc89c4aedbd3b1a7fd785e0e9c226174ba (diff)
Add missing function doc
-rw-r--r--src/lib.rs5
-rw-r--r--target/doc/mailparse/fn.parse_mail.html2
-rw-r--r--target/doc/mailparse/index.html2
-rw-r--r--target/doc/mailparse/struct.ParsedMail.html9
-rw-r--r--target/doc/search-index.js2
-rw-r--r--target/doc/src/mailparse/lib.rs.html10
6 files changed, 25 insertions, 5 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 9ba8535..fc5ec35 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -719,6 +719,11 @@ impl<'a> ParsedMail<'a> {
Ok(decoded)
}
+ /// Returns a struct containing a parsed representation of the
+ /// Content-Disposition header. The first header with this name
+ /// is used, if there are multiple. See the `parse_content_disposition`
+ /// method documentation for more details on the semantics of the
+ /// returned object.
pub fn get_content_disposition(&self) -> Result<ParsedContentDisposition, MailParseError> {
let disposition = self.headers
.get_first_value("Content-Disposition")?
diff --git a/target/doc/mailparse/fn.parse_mail.html b/target/doc/mailparse/fn.parse_mail.html
index 874c810..62d9e6b 100644
--- a/target/doc/mailparse/fn.parse_mail.html
+++ b/target/doc/mailparse/fn.parse_mail.html
@@ -48,7 +48,7 @@
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>]
</a>
- </span><a class='srclink' href='../src/mailparse/lib.rs.html#768-813' title='goto source code'>[src]</a></span></h1>
+ </span><a class='srclink' href='../src/mailparse/lib.rs.html#773-818' title='goto source code'>[src]</a></span></h1>
<pre class='rust fn'>pub fn parse_mail(raw_data: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../mailparse/struct.ParsedMail.html" title="struct mailparse::ParsedMail">ParsedMail</a>, <a class="enum" href="../mailparse/enum.MailParseError.html" title="enum mailparse::MailParseError">MailParseError</a>&gt;</pre><div class='docblock'><p>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
diff --git a/target/doc/mailparse/index.html b/target/doc/mailparse/index.html
index f9362fd..f6e3ff2 100644
--- a/target/doc/mailparse/index.html
+++ b/target/doc/mailparse/index.html
@@ -48,7 +48,7 @@
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>]
</a>
- </span><a class='srclink' href='../src/mailparse/lib.rs.html#1-1209' title='goto source code'>[src]</a></span></h1>
+ </span><a class='srclink' href='../src/mailparse/lib.rs.html#1-1214' title='goto source code'>[src]</a></span></h1>
<h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table>
<tr class=' module-item'>
diff --git a/target/doc/mailparse/struct.ParsedMail.html b/target/doc/mailparse/struct.ParsedMail.html
index 4e3909a..0925b0d 100644
--- a/target/doc/mailparse/struct.ParsedMail.html
+++ b/target/doc/mailparse/struct.ParsedMail.html
@@ -71,7 +71,7 @@ a vector of other ParsedMail structures for the subparts.</p>
<code>subparts: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../mailparse/struct.ParsedMail.html" title="struct mailparse::ParsedMail">ParsedMail</a>&lt;'a&gt;&gt;</code>
</span></span><div class='docblock'><p>The subparts of this message or subpart. This vector is only non-empty
if ctype.mimetype starts with &quot;multipart/&quot;.</p>
-</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl&lt;'a&gt; <a class="struct" href="../mailparse/struct.ParsedMail.html" title="struct mailparse::ParsedMail">ParsedMail</a>&lt;'a&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/mailparse/lib.rs.html#656-729' title='goto source code'>[src]</a></span></h3>
+</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl&lt;'a&gt; <a class="struct" href="../mailparse/struct.ParsedMail.html" title="struct mailparse::ParsedMail">ParsedMail</a>&lt;'a&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/mailparse/lib.rs.html#656-734' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.get_body' class="method"><span id='get_body.v' class='invisible'><code>fn <a href='#method.get_body' class='fnname'>get_body</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="enum" href="../mailparse/enum.MailParseError.html" title="enum mailparse::MailParseError">MailParseError</a>&gt;</code></span></h4>
<div class='docblock'><p>Get the body of the message as a Rust string. This function tries to
unapply the Content-Transfer-Encoding if there is one, and then converts
@@ -102,7 +102,12 @@ any charset decoding.</p>
.<span class="ident">unwrap</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">p</span>.<span class="ident">get_body_raw</span>().<span class="ident">unwrap</span>(), <span class="string">b&quot;This is the body&quot;</span>);</pre>
</div><h4 id='method.get_content_disposition' class="method"><span id='get_content_disposition.v' class='invisible'><code>fn <a href='#method.get_content_disposition' class='fnname'>get_content_disposition</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../mailparse/struct.ParsedContentDisposition.html" title="struct mailparse::ParsedContentDisposition">ParsedContentDisposition</a>, <a class="enum" href="../mailparse/enum.MailParseError.html" title="enum mailparse::MailParseError">MailParseError</a>&gt;</code></span></h4>
-</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../mailparse/struct.ParsedMail.html" title="struct mailparse::ParsedMail">ParsedMail</a>&lt;'a&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/mailparse/lib.rs.html#643' title='goto source code'>[src]</a></span></h3>
+<div class='docblock'><p>Returns a struct containing a parsed representation of the
+Content-Disposition header. The first header with this name
+is used, if there are multiple. See the <code>parse_content_disposition</code>
+method documentation for more details on the semantics of the
+returned object.</p>
+</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../mailparse/struct.ParsedMail.html" title="struct mailparse::ParsedMail">ParsedMail</a>&lt;'a&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/mailparse/lib.rs.html#643' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span></h4>
<div class='docblock'><p>Formats the value using the given formatter.</p>
</div></div></section>
diff --git a/target/doc/search-index.js b/target/doc/search-index.js
index 8ff7a44..d23bed9 100644
--- a/target/doc/search-index.js
+++ b/target/doc/search-index.js
@@ -1,3 +1,3 @@
var searchIndex = {};
-searchIndex["mailparse"] = {"doc":"","items":[[3,"MailHeader","mailparse","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.",null,null],[3,"ParsedContentType","","A struct to hold a more structured representation of the Content-Type header. This is provided mostly as a convenience since this metadata is usually needed to interpret the message body properly.",null,null],[12,"mimetype","","The type of the data, for example \"text/plain\" or \"application/pdf\".",0,null],[12,"charset","","The charset used to decode the raw byte data, for example \"iso-8859-1\" or \"utf-8\".",0,null],[12,"params","","The additional params of Content-Type, e.g. filename and boundary. The keys in the map will be lowercased, and the values will have any enclosing quotes stripped.",0,null],[3,"ParsedContentDisposition","","A struct to hold a more structured representation of the Content-Disposition header. This is provided mostly as a convenience since this metadata is usually needed to interpret the message body properly.",null,null],[12,"disposition","","The disposition type of the Content-Disposition header. If this is an extension type, the string will be lowercased.",1,null],[12,"params","","The additional params of Content-Disposition, e.g. filename. The keys in the map will be lowercased, and the values will have any enclosing quotes stripped.",1,null],[3,"ParsedMail","","Struct that holds the structured representation of the message. Note that since MIME allows for nested multipart messages, a tree-like structure is necessary to represent it properly. This struct accomplishes that by holding a vector of other ParsedMail structures for the subparts.",null,null],[12,"headers","","The headers for the message (or message subpart).",2,null],[12,"ctype","","The Content-Type information for the message (or message subpart).",2,null],[12,"subparts","","The subparts of this message or subpart. This vector is only non-empty if ctype.mimetype starts with \"multipart/\".",2,null],[4,"MailParseError","","An error type that represents the different kinds of errors that may be encountered during message parsing.",null,null],[13,"QuotedPrintableDecodeError","","Data that was specified as being in the quoted-printable transfer-encoding could not be successfully decoded as quoted-printable data.",3,null],[13,"Base64DecodeError","","Data that was specified as being in the base64 transfer-encoding could not be successfully decoded as base64 data.",3,null],[13,"EncodingError","","An error occurred when converting the raw byte data to Rust UTF-8 string format using the charset specified in the message.",3,null],[13,"Generic","","Some other error occurred while parsing the message; the description string provides additional details.",3,null],[4,"DispositionType","","The possible disposition types in a Content-Disposition header. A more comprehensive list of IANA-recognized types can be found at https://www.iana.org/assignments/cont-disp/cont-disp.xhtml. This library only enumerates the types most commonly found in email messages, and provides the `Extension` value for holding all other types.",null,null],[13,"Inline","","Default value, indicating the content is to be displayed inline as part of the enclosing document.",4,null],[13,"Attachment","","A disposition indicating the content is not meant for inline display, but whose content can be accessed for use.",4,null],[13,"FormData","","A disposition indicating the content contains a form submission.",4,null],[13,"Extension","","Extension type to hold any disposition not explicitly enumerated.",4,null],[5,"dateparse","","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.",null,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[5,"parse_header","","Parse a single header from the raw data given. This function takes raw byte data, and starts parsing it, expecting there to be a MIME header key-value pair right at the beginning. It parses that header and returns it, along with the index at which the next header is expected to start. If you just want to parse a single header, you can ignore the second component of the tuple, which is the index of the next header. Error values are returned if the data could not be successfully interpreted as a MIME key-value pair.",null,null],[5,"parse_headers","","Parses all the headers from the raw data given. This function takes raw byte data, and starts parsing it, expecting there to be zero or more MIME header key-value pair right at the beginning, followed by two consecutive newlines (i.e. a blank line). It parses those headers and returns them in a vector. The normal vector functions can be used to access the headers linearly, or the MailHeaderMap trait can be used to access them in a map-like fashion. Along with this vector, the function returns the index at which the message body is expected to start. If you just care about the headers, you can ignore the second component of the returned tuple. Error values are returned if there was some sort of parsing error.",null,null],[5,"parse_content_type","","Helper method to parse a header value as a Content-Type header. Note that the returned object's `params` map will contain a charset key if a charset was explicitly specified in the header; otherwise the `params` map will not contain a charset key. Regardless, the `charset` field will contain a charset - either the one explicitly specified or the default of \"us-ascii\".",null,{"inputs":[{"name":"str"}],"output":{"name":"parsedcontenttype"}}],[5,"parse_content_disposition","","Helper method to parse a header value as a Content-Disposition header. The disposition defaults to \"inline\" if no disposition parameter is provided in the header value.",null,{"inputs":[{"name":"str"}],"output":{"name":"parsedcontentdisposition"}}],[5,"parse_mail","","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.",null,null],[8,"MailHeaderMap","","A trait that is implemented by the Vec returned by the parse_headers function. It provides a map-like interface to look up header values by their name.",null,null],[10,"get_first_value","","Look through the list of headers and return the value of the first one that matches the provided key. It returns Ok(None) if the no matching header was found. Header names are matched case-insensitively.",5,{"inputs":[{"name":"self"},{"name":"str"}],"output":{"name":"result"}}],[10,"get_all_values","","Look through the list of headers and return the values of all headers matching the provided key. Returns an empty vector if no matching headers were found. The order of the returned values is the same as the order of the matching headers in the message. Header names are matched case-insensitively.",5,{"inputs":[{"name":"self"},{"name":"str"}],"output":{"name":"result"}}],[11,"fmt","","",3,{"inputs":[{"name":"self"},{"name":"formatter"}],"output":{"name":"result"}}],[11,"fmt","","",3,{"inputs":[{"name":"self"},{"name":"formatter"}],"output":{"name":"result"}}],[11,"description","","",3,{"inputs":[{"name":"self"}],"output":{"name":"str"}}],[11,"cause","","",3,{"inputs":[{"name":"self"}],"output":{"name":"option"}}],[11,"from","","",3,{"inputs":[{"name":"quotedprintableerror"}],"output":{"name":"mailparseerror"}}],[11,"from","","",3,{"inputs":[{"name":"base64error"}],"output":{"name":"mailparseerror"}}],[11,"from","","",3,{"inputs":[{"name":"cow"}],"output":{"name":"mailparseerror"}}],[11,"fmt","","",6,{"inputs":[{"name":"self"},{"name":"formatter"}],"output":{"name":"result"}}],[11,"get_key","","Get the name of the header. Note that header names are case-insensitive.",6,{"inputs":[{"name":"self"}],"output":{"name":"result"}}],[11,"get_value","","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.",6,{"inputs":[{"name":"self"}],"output":{"name":"result"}}],[11,"fmt","","",0,{"inputs":[{"name":"self"},{"name":"formatter"}],"output":{"name":"result"}}],[11,"default","","",0,{"inputs":[],"output":{"name":"self"}}],[11,"fmt","","",4,{"inputs":[{"name":"self"},{"name":"formatter"}],"output":{"name":"result"}}],[11,"clone","","",4,{"inputs":[{"name":"self"}],"output":{"name":"dispositiontype"}}],[11,"eq","","",4,{"inputs":[{"name":"self"},{"name":"dispositiontype"}],"output":{"name":"bool"}}],[11,"ne","","",4,{"inputs":[{"name":"self"},{"name":"dispositiontype"}],"output":{"name":"bool"}}],[11,"default","","",4,{"inputs":[],"output":{"name":"self"}}],[11,"fmt","","",1,{"inputs":[{"name":"self"},{"name":"formatter"}],"output":{"name":"result"}}],[11,"default","","",1,{"inputs":[],"output":{"name":"parsedcontentdisposition"}}],[11,"fmt","","",2,{"inputs":[{"name":"self"},{"name":"formatter"}],"output":{"name":"result"}}],[11,"get_body","","Get the body of the message as a Rust string. This function tries to unapply the Content-Transfer-Encoding if there is one, and then converts the result into a Rust UTF-8 string using the charset in the Content-Type (or \"us-ascii\" if the charset was missing or not recognized).",2,{"inputs":[{"name":"self"}],"output":{"name":"result"}}],[11,"get_body_raw","","Get the body of the message as a Rust Vec. This function tries to unapply the Content-Transfer-Encoding if there is one, but won't do any charset decoding.",2,{"inputs":[{"name":"self"}],"output":{"name":"result"}}],[11,"get_content_disposition","","",2,{"inputs":[{"name":"self"}],"output":{"name":"result"}}]],"paths":[[3,"ParsedContentType"],[3,"ParsedContentDisposition"],[3,"ParsedMail"],[4,"MailParseError"],[4,"DispositionType"],[8,"MailHeaderMap"],[3,"MailHeader"]]};
+searchIndex["mailparse"] = {"doc":"","items":[[3,"MailHeader","mailparse","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.",null,null],[3,"ParsedContentType","","A struct to hold a more structured representation of the Content-Type header. This is provided mostly as a convenience since this metadata is usually needed to interpret the message body properly.",null,null],[12,"mimetype","","The type of the data, for example \"text/plain\" or \"application/pdf\".",0,null],[12,"charset","","The charset used to decode the raw byte data, for example \"iso-8859-1\" or \"utf-8\".",0,null],[12,"params","","The additional params of Content-Type, e.g. filename and boundary. The keys in the map will be lowercased, and the values will have any enclosing quotes stripped.",0,null],[3,"ParsedContentDisposition","","A struct to hold a more structured representation of the Content-Disposition header. This is provided mostly as a convenience since this metadata is usually needed to interpret the message body properly.",null,null],[12,"disposition","","The disposition type of the Content-Disposition header. If this is an extension type, the string will be lowercased.",1,null],[12,"params","","The additional params of Content-Disposition, e.g. filename. The keys in the map will be lowercased, and the values will have any enclosing quotes stripped.",1,null],[3,"ParsedMail","","Struct that holds the structured representation of the message. Note that since MIME allows for nested multipart messages, a tree-like structure is necessary to represent it properly. This struct accomplishes that by holding a vector of other ParsedMail structures for the subparts.",null,null],[12,"headers","","The headers for the message (or message subpart).",2,null],[12,"ctype","","The Content-Type information for the message (or message subpart).",2,null],[12,"subparts","","The subparts of this message or subpart. This vector is only non-empty if ctype.mimetype starts with \"multipart/\".",2,null],[4,"MailParseError","","An error type that represents the different kinds of errors that may be encountered during message parsing.",null,null],[13,"QuotedPrintableDecodeError","","Data that was specified as being in the quoted-printable transfer-encoding could not be successfully decoded as quoted-printable data.",3,null],[13,"Base64DecodeError","","Data that was specified as being in the base64 transfer-encoding could not be successfully decoded as base64 data.",3,null],[13,"EncodingError","","An error occurred when converting the raw byte data to Rust UTF-8 string format using the charset specified in the message.",3,null],[13,"Generic","","Some other error occurred while parsing the message; the description string provides additional details.",3,null],[4,"DispositionType","","The possible disposition types in a Content-Disposition header. A more comprehensive list of IANA-recognized types can be found at https://www.iana.org/assignments/cont-disp/cont-disp.xhtml. This library only enumerates the types most commonly found in email messages, and provides the `Extension` value for holding all other types.",null,null],[13,"Inline","","Default value, indicating the content is to be displayed inline as part of the enclosing document.",4,null],[13,"Attachment","","A disposition indicating the content is not meant for inline display, but whose content can be accessed for use.",4,null],[13,"FormData","","A disposition indicating the content contains a form submission.",4,null],[13,"Extension","","Extension type to hold any disposition not explicitly enumerated.",4,null],[5,"dateparse","","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.",null,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[5,"parse_header","","Parse a single header from the raw data given. This function takes raw byte data, and starts parsing it, expecting there to be a MIME header key-value pair right at the beginning. It parses that header and returns it, along with the index at which the next header is expected to start. If you just want to parse a single header, you can ignore the second component of the tuple, which is the index of the next header. Error values are returned if the data could not be successfully interpreted as a MIME key-value pair.",null,null],[5,"parse_headers","","Parses all the headers from the raw data given. This function takes raw byte data, and starts parsing it, expecting there to be zero or more MIME header key-value pair right at the beginning, followed by two consecutive newlines (i.e. a blank line). It parses those headers and returns them in a vector. The normal vector functions can be used to access the headers linearly, or the MailHeaderMap trait can be used to access them in a map-like fashion. Along with this vector, the function returns the index at which the message body is expected to start. If you just care about the headers, you can ignore the second component of the returned tuple. Error values are returned if there was some sort of parsing error.",null,null],[5,"parse_content_type","","Helper method to parse a header value as a Content-Type header. Note that the returned object's `params` map will contain a charset key if a charset was explicitly specified in the header; otherwise the `params` map will not contain a charset key. Regardless, the `charset` field will contain a charset - either the one explicitly specified or the default of \"us-ascii\".",null,{"inputs":[{"name":"str"}],"output":{"name":"parsedcontenttype"}}],[5,"parse_content_disposition","","Helper method to parse a header value as a Content-Disposition header. The disposition defaults to \"inline\" if no disposition parameter is provided in the header value.",null,{"inputs":[{"name":"str"}],"output":{"name":"parsedcontentdisposition"}}],[5,"parse_mail","","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.",null,null],[8,"MailHeaderMap","","A trait that is implemented by the Vec returned by the parse_headers function. It provides a map-like interface to look up header values by their name.",null,null],[10,"get_first_value","","Look through the list of headers and return the value of the first one that matches the provided key. It returns Ok(None) if the no matching header was found. Header names are matched case-insensitively.",5,{"inputs":[{"name":"self"},{"name":"str"}],"output":{"name":"result"}}],[10,"get_all_values","","Look through the list of headers and return the values of all headers matching the provided key. Returns an empty vector if no matching headers were found. The order of the returned values is the same as the order of the matching headers in the message. Header names are matched case-insensitively.",5,{"inputs":[{"name":"self"},{"name":"str"}],"output":{"name":"result"}}],[11,"fmt","","",3,{"inputs":[{"name":"self"},{"name":"formatter"}],"output":{"name":"result"}}],[11,"fmt","","",3,{"inputs":[{"name":"self"},{"name":"formatter"}],"output":{"name":"result"}}],[11,"description","","",3,{"inputs":[{"name":"self"}],"output":{"name":"str"}}],[11,"cause","","",3,{"inputs":[{"name":"self"}],"output":{"name":"option"}}],[11,"from","","",3,{"inputs":[{"name":"quotedprintableerror"}],"output":{"name":"mailparseerror"}}],[11,"from","","",3,{"inputs":[{"name":"base64error"}],"output":{"name":"mailparseerror"}}],[11,"from","","",3,{"inputs":[{"name":"cow"}],"output":{"name":"mailparseerror"}}],[11,"fmt","","",6,{"inputs":[{"name":"self"},{"name":"formatter"}],"output":{"name":"result"}}],[11,"get_key","","Get the name of the header. Note that header names are case-insensitive.",6,{"inputs":[{"name":"self"}],"output":{"name":"result"}}],[11,"get_value","","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.",6,{"inputs":[{"name":"self"}],"output":{"name":"result"}}],[11,"fmt","","",0,{"inputs":[{"name":"self"},{"name":"formatter"}],"output":{"name":"result"}}],[11,"default","","",0,{"inputs":[],"output":{"name":"self"}}],[11,"fmt","","",4,{"inputs":[{"name":"self"},{"name":"formatter"}],"output":{"name":"result"}}],[11,"clone","","",4,{"inputs":[{"name":"self"}],"output":{"name":"dispositiontype"}}],[11,"eq","","",4,{"inputs":[{"name":"self"},{"name":"dispositiontype"}],"output":{"name":"bool"}}],[11,"ne","","",4,{"inputs":[{"name":"self"},{"name":"dispositiontype"}],"output":{"name":"bool"}}],[11,"default","","",4,{"inputs":[],"output":{"name":"self"}}],[11,"fmt","","",1,{"inputs":[{"name":"self"},{"name":"formatter"}],"output":{"name":"result"}}],[11,"default","","",1,{"inputs":[],"output":{"name":"parsedcontentdisposition"}}],[11,"fmt","","",2,{"inputs":[{"name":"self"},{"name":"formatter"}],"output":{"name":"result"}}],[11,"get_body","","Get the body of the message as a Rust string. This function tries to unapply the Content-Transfer-Encoding if there is one, and then converts the result into a Rust UTF-8 string using the charset in the Content-Type (or \"us-ascii\" if the charset was missing or not recognized).",2,{"inputs":[{"name":"self"}],"output":{"name":"result"}}],[11,"get_body_raw","","Get the body of the message as a Rust Vec. This function tries to unapply the Content-Transfer-Encoding if there is one, but won't do any charset decoding.",2,{"inputs":[{"name":"self"}],"output":{"name":"result"}}],[11,"get_content_disposition","","Returns a struct containing a parsed representation of the Content-Disposition header. The first header with this name is used, if there are multiple. See the `parse_content_disposition` method documentation for more details on the semantics of the returned object.",2,{"inputs":[{"name":"self"}],"output":{"name":"result"}}]],"paths":[[3,"ParsedContentType"],[3,"ParsedContentDisposition"],[3,"ParsedMail"],[4,"MailParseError"],[4,"DispositionType"],[8,"MailHeaderMap"],[3,"MailHeader"]]};
initSearch(searchIndex);
diff --git a/target/doc/src/mailparse/lib.rs.html b/target/doc/src/mailparse/lib.rs.html
index 1912221..9ec17f4 100644
--- a/target/doc/src/mailparse/lib.rs.html
+++ b/target/doc/src/mailparse/lib.rs.html
@@ -1252,6 +1252,11 @@
<span id="1207">1207</span>
<span id="1208">1208</span>
<span id="1209">1209</span>
+<span id="1210">1210</span>
+<span id="1211">1211</span>
+<span id="1212">1212</span>
+<span id="1213">1213</span>
+<span id="1214">1214</span>
</pre><pre class="rust ">
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">base64</span>;
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">encoding</span>;
@@ -1974,6 +1979,11 @@
<span class="prelude-val">Ok</span>(<span class="ident">decoded</span>)
}
+ <span class="doccomment">/// Returns a struct containing a parsed representation of the</span>
+ <span class="doccomment">/// Content-Disposition header. The first header with this name</span>
+ <span class="doccomment">/// is used, if there are multiple. See the `parse_content_disposition`</span>
+ <span class="doccomment">/// method documentation for more details on the semantics of the</span>
+ <span class="doccomment">/// returned object.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get_content_disposition</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">ParsedContentDisposition</span>, <span class="ident">MailParseError</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">disposition</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">headers</span>
.<span class="ident">get_first_value</span>(<span class="string">&quot;Content-Disposition&quot;</span>)<span class="question-mark">?</span>