diff options
Diffstat (limited to 'target/doc/mailparse')
-rw-r--r-- | target/doc/mailparse/fn.parse_content_type.html | 2 | ||||
-rw-r--r-- | target/doc/mailparse/fn.parse_headers.html | 2 | ||||
-rw-r--r-- | target/doc/mailparse/fn.parse_mail.html | 2 | ||||
-rw-r--r-- | target/doc/mailparse/index.html | 2 | ||||
-rw-r--r-- | target/doc/mailparse/struct.MailHeader.html | 2 | ||||
-rw-r--r-- | target/doc/mailparse/struct.ParsedContentType.html | 2 | ||||
-rw-r--r-- | target/doc/mailparse/struct.ParsedMail.html | 2 | ||||
-rw-r--r-- | target/doc/mailparse/trait.MailHeaderMap.html | 15 |
8 files changed, 11 insertions, 18 deletions
diff --git a/target/doc/mailparse/fn.parse_content_type.html b/target/doc/mailparse/fn.parse_content_type.html index e81fb02..08ef924 100644 --- a/target/doc/mailparse/fn.parse_content_type.html +++ b/target/doc/mailparse/fn.parse_content_type.html @@ -47,7 +47,7 @@ <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs"> [<span class='inner'>−</span>] </a> - </span><a id='src-312' class='srclink' href='../src/mailparse/src/lib.rs.html#539-564' title='goto source code'>[src]</a></span></h1> + </span><a id='src-285' class='srclink' href='../src/mailparse/src/lib.rs.html#511-536' title='goto source code'>[src]</a></span></h1> <pre class='rust fn'>pub fn parse_content_type(header: &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='struct' href='../mailparse/struct.ParsedContentType.html' title='mailparse::ParsedContentType'>ParsedContentType</a>, <a class='enum' href='../mailparse/enum.MailParseError.html' title='mailparse::MailParseError'>MailParseError</a>></pre><div class='docblock'><p>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.</p> diff --git a/target/doc/mailparse/fn.parse_headers.html b/target/doc/mailparse/fn.parse_headers.html index 9a86a17..c5e42be 100644 --- a/target/doc/mailparse/fn.parse_headers.html +++ b/target/doc/mailparse/fn.parse_headers.html @@ -47,7 +47,7 @@ <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs"> [<span class='inner'>−</span>] </a> - </span><a id='src-292' class='srclink' href='../src/mailparse/src/lib.rs.html#474-497' title='goto source code'>[src]</a></span></h1> + </span><a id='src-265' class='srclink' href='../src/mailparse/src/lib.rs.html#446-469' title='goto source code'>[src]</a></span></h1> <pre class='rust fn'>pub fn parse_headers(raw_data: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</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>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='struct' href='../mailparse/struct.MailHeader.html' title='mailparse::MailHeader'>MailHeader</a>>, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>, <a class='enum' href='../mailparse/enum.MailParseError.html' title='mailparse::MailParseError'>MailParseError</a>></pre><div class='docblock'><p>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, diff --git a/target/doc/mailparse/fn.parse_mail.html b/target/doc/mailparse/fn.parse_mail.html index 509783e..95d75aa 100644 --- a/target/doc/mailparse/fn.parse_mail.html +++ b/target/doc/mailparse/fn.parse_mail.html @@ -47,7 +47,7 @@ <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs"> [<span class='inner'>−</span>] </a> - </span><a id='src-358' class='srclink' href='../src/mailparse/src/lib.rs.html#662-704' title='goto source code'>[src]</a></span></h1> + </span><a id='src-331' class='srclink' href='../src/mailparse/src/lib.rs.html#634-676' 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'>&[</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>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='struct' href='../mailparse/struct.ParsedMail.html' title='mailparse::ParsedMail'>ParsedMail</a>, <a class='enum' href='../mailparse/enum.MailParseError.html' title='mailparse::MailParseError'>MailParseError</a>></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 5b6e8a4..83af7c0 100644 --- a/target/doc/mailparse/index.html +++ b/target/doc/mailparse/index.html @@ -47,7 +47,7 @@ <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs"> [<span class='inner'>−</span>] </a> - </span><a id='src-0' class='srclink' href='../src/mailparse/src/lib.rs.html#1-977' title='goto source code'>[src]</a></span></h1> + </span><a id='src-0' class='srclink' href='../src/mailparse/src/lib.rs.html#1-949' 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.MailHeader.html b/target/doc/mailparse/struct.MailHeader.html index 0313162..0160a89 100644 --- a/target/doc/mailparse/struct.MailHeader.html +++ b/target/doc/mailparse/struct.MailHeader.html @@ -56,7 +56,7 @@ 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.</p> </div><h2 id='methods'>Methods</h2><h3 class='impl'><code>impl<'a> <a class='struct' href='../mailparse/struct.MailHeader.html' title='mailparse::MailHeader'>MailHeader</a><'a></code></h3><div class='impl-items'><h4 id='method.get_key' class='method'><code>fn <a href='#method.get_key' class='fnname'>get_key</a>(&self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>, <a class='enum' href='../mailparse/enum.MailParseError.html' title='mailparse::MailParseError'>MailParseError</a>></code></h4> -<div class='docblock'><p>Get the name of the header. Note that header names are case-sensitive.</p> +<div class='docblock'><p>Get the name of the header. Note that header names are case-insensitive.</p> </div><h4 id='method.get_value' class='method'><code>fn <a href='#method.get_value' class='fnname'>get_value</a>(&self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>, <a class='enum' href='../mailparse/enum.MailParseError.html' title='mailparse::MailParseError'>MailParseError</a>></code></h4> <div class='docblock'><p>Get the value of the header. Any sequences of newlines characters followed by whitespace are collapsed into a single space. In effect, header values diff --git a/target/doc/mailparse/struct.ParsedContentType.html b/target/doc/mailparse/struct.ParsedContentType.html index d9e362b..8d4d189 100644 --- a/target/doc/mailparse/struct.ParsedContentType.html +++ b/target/doc/mailparse/struct.ParsedContentType.html @@ -47,7 +47,7 @@ <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs"> [<span class='inner'>−</span>] </a> - </span><a id='src-300' class='srclink' href='../src/mailparse/src/lib.rs.html#503-514' title='goto source code'>[src]</a></span></h1> + </span><a id='src-273' class='srclink' href='../src/mailparse/src/lib.rs.html#475-486' title='goto source code'>[src]</a></span></h1> <pre class='rust struct'>pub struct ParsedContentType { pub mimetype: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>, pub charset: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>, diff --git a/target/doc/mailparse/struct.ParsedMail.html b/target/doc/mailparse/struct.ParsedMail.html index d298da8..5446417 100644 --- a/target/doc/mailparse/struct.ParsedMail.html +++ b/target/doc/mailparse/struct.ParsedMail.html @@ -47,7 +47,7 @@ <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs"> [<span class='inner'>−</span>] </a> - </span><a id='src-320' class='srclink' href='../src/mailparse/src/lib.rs.html#571-581' title='goto source code'>[src]</a></span></h1> + </span><a id='src-293' class='srclink' href='../src/mailparse/src/lib.rs.html#543-553' title='goto source code'>[src]</a></span></h1> <pre class='rust struct'>pub struct ParsedMail<'a> { pub headers: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='struct' href='../mailparse/struct.MailHeader.html' title='mailparse::MailHeader'>MailHeader</a><'a>>, pub ctype: <a class='struct' href='../mailparse/struct.ParsedContentType.html' title='mailparse::ParsedContentType'>ParsedContentType</a>, diff --git a/target/doc/mailparse/trait.MailHeaderMap.html b/target/doc/mailparse/trait.MailHeaderMap.html index 44ebe60..245b416 100644 --- a/target/doc/mailparse/trait.MailHeaderMap.html +++ b/target/doc/mailparse/trait.MailHeaderMap.html @@ -47,12 +47,10 @@ <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs"> [<span class='inner'>−</span>] </a> - </span><a id='src-233' class='srclink' href='../src/mailparse/src/lib.rs.html#364-407' title='goto source code'>[src]</a></span></h1> + </span><a id='src-233' class='srclink' href='../src/mailparse/src/lib.rs.html#364-398' title='goto source code'>[src]</a></span></h1> <pre class='rust trait'>pub trait MailHeaderMap { fn <a href='#tymethod.get_first_value' class='fnname'>get_first_value</a>(&self, key: &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>>, <a class='enum' href='../mailparse/enum.MailParseError.html' title='mailparse::MailParseError'>MailParseError</a>>; - fn <a href='#tymethod.get_first_value_ci' class='fnname'>get_first_value_ci</a>(&self, key: &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>>, <a class='enum' href='../mailparse/enum.MailParseError.html' title='mailparse::MailParseError'>MailParseError</a>>; fn <a href='#tymethod.get_all_values' class='fnname'>get_all_values</a>(&self, key: &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>>, <a class='enum' href='../mailparse/enum.MailParseError.html' title='mailparse::MailParseError'>MailParseError</a>>; - fn <a href='#tymethod.get_all_values_ci' class='fnname'>get_all_values_ci</a>(&self, key: &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>>, <a class='enum' href='../mailparse/enum.MailParseError.html' title='mailparse::MailParseError'>MailParseError</a>>; }</pre><div class='docblock'><p>A trait that is implemented by the Vec<MailHeader> returned by the parse_headers function. It provides a map-like interface to look up header values by their name.</p> @@ -61,7 +59,7 @@ name.</p> <div class='methods'> <h3 id='tymethod.get_first_value' class='method stab '><code>fn <a href='#tymethod.get_first_value' class='fnname'>get_first_value</a>(&self, key: &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>>, <a class='enum' href='../mailparse/enum.MailParseError.html' title='mailparse::MailParseError'>MailParseError</a>></code></h3><div class='docblock'><p>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.</p> +header was found. Header names are matched case-insensitively.</p> <h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1> <pre class='rust rust-example-rendered'> @@ -72,13 +70,11 @@ header was found.</p> <span class='string'>"This is a test message"</span>).<span class='ident'>as_bytes</span>()) .<span class='ident'>unwrap</span>().<span class='ident'>headers</span>; <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>headers</span>.<span class='ident'>get_first_value</span>(<span class='string'>"Subject"</span>).<span class='ident'>unwrap</span>(), <span class='prelude-val'>Some</span>(<span class='string'>"Test"</span>.<span class='ident'>to_string</span>()));</pre> -</div><h3 id='tymethod.get_first_value_ci' class='method stab '><code>fn <a href='#tymethod.get_first_value_ci' class='fnname'>get_first_value_ci</a>(&self, key: &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>>, <a class='enum' href='../mailparse/enum.MailParseError.html' title='mailparse::MailParseError'>MailParseError</a>></code></h3><div class='docblock'><p>Same as get_first_value, but does a case-insensitive search for the header. -According to the spec the mail headers are supposed to be case-sensitive, -but in real-world scenarios that's not always the case.</p> </div><h3 id='tymethod.get_all_values' class='method stab '><code>fn <a href='#tymethod.get_all_values' class='fnname'>get_all_values</a>(&self, key: &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>>, <a class='enum' href='../mailparse/enum.MailParseError.html' title='mailparse::MailParseError'>MailParseError</a>></code></h3><div class='docblock'><p>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.</p> +of the matching headers in the message. Header names are matched +case-insensitively.</p> <h1 id='examples-1' class='section-header'><a href='#examples-1'>Examples</a></h1> <pre class='rust rust-example-rendered'> @@ -89,9 +85,6 @@ of the matching headers in the message.</p> .<span class='ident'>unwrap</span>().<span class='ident'>headers</span>; <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>headers</span>.<span class='ident'>get_all_values</span>(<span class='string'>"Key"</span>).<span class='ident'>unwrap</span>(), <span class='macro'>vec</span><span class='macro'>!</span>[<span class='string'>"Value1"</span>.<span class='ident'>to_string</span>(), <span class='string'>"Value2"</span>.<span class='ident'>to_string</span>()]);</pre> -</div><h3 id='tymethod.get_all_values_ci' class='method stab '><code>fn <a href='#tymethod.get_all_values_ci' class='fnname'>get_all_values_ci</a>(&self, key: &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>>, <a class='enum' href='../mailparse/enum.MailParseError.html' title='mailparse::MailParseError'>MailParseError</a>></code></h3><div class='docblock'><p>Same as get_all_values, but does a case-insensitive search for the header. -According to the spec the mail headers are supposed to be case-sensitive, -but in real-world scenarios that's not always the case.</p> </div></div> <h2 id='implementors'>Implementors</h2> <ul class='item-list' id='implementors-list'> |