diff options
Diffstat (limited to 'target/doc/mailparse/trait.MailHeaderMap.html')
-rw-r--r-- | target/doc/mailparse/trait.MailHeaderMap.html | 15 |
1 files changed, 4 insertions, 11 deletions
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'> |