summaryrefslogtreecommitdiffstats
path: root/target/doc/mailparse/fn.parse_content_type.html
diff options
context:
space:
mode:
Diffstat (limited to 'target/doc/mailparse/fn.parse_content_type.html')
-rw-r--r--target/doc/mailparse/fn.parse_content_type.html19
1 files changed, 9 insertions, 10 deletions
diff --git a/target/doc/mailparse/fn.parse_content_type.html b/target/doc/mailparse/fn.parse_content_type.html
index f76083b..b60539e 100644
--- a/target/doc/mailparse/fn.parse_content_type.html
+++ b/target/doc/mailparse/fn.parse_content_type.html
@@ -10,10 +10,11 @@
<title>mailparse::parse_content_type - Rust</title>
<link rel="stylesheet" type="text/css" href="../normalize.css">
- <link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle">
+ <link rel="stylesheet" type="text/css" href="../rustdoc.css"
+ id="mainThemeStyle">
<link rel="stylesheet" type="text/css" href="../dark.css">
- <link rel="stylesheet" type="text/css" href="../main.css" id="themeStyle">
+ <link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle">
<script src="../storage.js"></script>
@@ -33,7 +34,7 @@
<nav class="sidebar">
<div class="sidebar-menu">&#9776;</div>
- <p class='location'><a href='index.html'>mailparse</a></p><script>window.sidebarCurrent = {name: 'parse_content_type', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script>
+ <div class="sidebar-elems"><p class='location'><a href='index.html'>mailparse</a></p><script>window.sidebarCurrent = {name: 'parse_content_type', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
</nav>
<div class="theme-picker">
@@ -54,13 +55,11 @@
</form>
</nav>
- <section id='main' class="content">
-<h1 class='fqn'><span class='in-band'>Function <a href='index.html'>mailparse</a>::<wbr><a class="fn" href=''>parse_content_type</a></span><span class='out-of-band'><span id='render-detail'>
+ <section id='main' class="content"><h1 class='fqn'><span class='in-band'>Function <a href='index.html'>mailparse</a>::<wbr><a class="fn" href=''>parse_content_type</a></span><span class='out-of-band'><span id='render-detail'>
<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#551-563' title='goto source code'>[src]</a></span></h1>
-<pre class='rust fn'>pub fn parse_content_type(header: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="../mailparse/struct.ParsedContentType.html" title="struct mailparse::ParsedContentType">ParsedContentType</a></pre><div class='docblock'><p>Helper method to parse a header value as a Content-Type header. Note that
+ </span><a class='srclink' href='../src/mailparse/lib.rs.html#554-566' title='goto source code'>[src]</a></span></h1><pre class='rust fn'>pub fn parse_content_type(header: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="../mailparse/struct.ParsedContentType.html" title="struct mailparse::ParsedContentType">ParsedContentType</a></pre><div class='docblock'><p>Helper method to parse a header value as a Content-Type header. Note that
the returned object's <code>params</code> map will contain a charset key if a charset
was explicitly specified in the header; otherwise the <code>params</code> map will not
contain a charset key. Regardless, the <code>charset</code> field will contain a
@@ -68,7 +67,7 @@ charset - either the one explicitly specified or the default of &quot;us-ascii&q
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">mailparse</span>::{<span class="ident">parse_header</span>, <span class="ident">parse_content_type</span>};
- <span class="kw">let</span> (<span class="ident">parsed</span>, _) <span class="op">=</span> <span class="ident">parse_header</span>(
+ <span class="kw">let</span> (<span class="ident">parsed</span>, <span class="kw">_</span>) <span class="op">=</span> <span class="ident">parse_header</span>(
<span class="string">b&quot;Content-Type: text/html; charset=foo; boundary=\&quot;quotes_are_removed\&quot;&quot;</span>)
.<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="ident">ctype</span> <span class="op">=</span> <span class="ident">parse_content_type</span>(<span class="kw-2">&amp;</span><span class="ident">parsed</span>.<span class="ident">get_value</span>().<span class="ident">unwrap</span>());
@@ -79,7 +78,7 @@ charset - either the one explicitly specified or the default of &quot;us-ascii&q
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">mailparse</span>::{<span class="ident">parse_header</span>, <span class="ident">parse_content_type</span>};
- <span class="kw">let</span> (<span class="ident">parsed</span>, _) <span class="op">=</span> <span class="ident">parse_header</span>(<span class="string">b&quot;Content-Type: bogus&quot;</span>).<span class="ident">unwrap</span>();
+ <span class="kw">let</span> (<span class="ident">parsed</span>, <span class="kw">_</span>) <span class="op">=</span> <span class="ident">parse_header</span>(<span class="string">b&quot;Content-Type: bogus&quot;</span>).<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="ident">ctype</span> <span class="op">=</span> <span class="ident">parse_content_type</span>(<span class="kw-2">&amp;</span><span class="ident">parsed</span>.<span class="ident">get_value</span>().<span class="ident">unwrap</span>());
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">ctype</span>.<span class="ident">mimetype</span>, <span class="string">&quot;bogus&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">ctype</span>.<span class="ident">charset</span>, <span class="string">&quot;us-ascii&quot;</span>);
@@ -88,7 +87,7 @@ charset - either the one explicitly specified or the default of &quot;us-ascii&q
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">mailparse</span>::{<span class="ident">parse_header</span>, <span class="ident">parse_content_type</span>};
- <span class="kw">let</span> (<span class="ident">parsed</span>, _) <span class="op">=</span> <span class="ident">parse_header</span>(<span class="string">br#&quot;Content-Type: application/octet-stream;name=&quot;=?utf8?B?6L+O5ai255m95a+M576O?=&quot;;charset=&quot;utf8&quot;&quot;#</span>).<span class="ident">unwrap</span>();
+ <span class="kw">let</span> (<span class="ident">parsed</span>, <span class="kw">_</span>) <span class="op">=</span> <span class="ident">parse_header</span>(<span class="string">br#&quot;Content-Type: application/octet-stream;name=&quot;=?utf8?B?6L+O5ai255m95a+M576O?=&quot;;charset=&quot;utf8&quot;&quot;#</span>).<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="ident">ctype</span> <span class="op">=</span> <span class="ident">parse_content_type</span>(<span class="kw-2">&amp;</span><span class="ident">parsed</span>.<span class="ident">get_value</span>().<span class="ident">unwrap</span>());
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">ctype</span>.<span class="ident">mimetype</span>, <span class="string">&quot;application/octet-stream&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">ctype</span>.<span class="ident">charset</span>, <span class="string">&quot;utf8&quot;</span>);