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.html46
1 files changed, 30 insertions, 16 deletions
diff --git a/target/doc/mailparse/fn.parse_content_type.html b/target/doc/mailparse/fn.parse_content_type.html
index a6e1511..f76083b 100644
--- a/target/doc/mailparse/fn.parse_content_type.html
+++ b/target/doc/mailparse/fn.parse_content_type.html
@@ -10,8 +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">
- <link rel="stylesheet" type="text/css" href="../main.css">
+ <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">
+ <script src="../storage.js"></script>
@@ -28,10 +31,18 @@
<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>
</nav>
+ <div class="theme-picker">
+ <button id="theme-picker" aria-label="Pick another theme!">
+ <img src="../brush.svg" width="18" alt="Pick another theme!">
+ </button>
+ <div id="theme-choices"></div>
+ </div>
+ <script src="../theme.js"></script>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
@@ -48,16 +59,15 @@
<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#552-564' title='goto source code'>[src]</a></span></h1>
+ </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
-the returned object&#39;s <code>params</code> map will contain a charset key if a charset
+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
charset - either the one explicitly specified or the default of &quot;us-ascii&quot;.</p>
-
-<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
+<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">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: text/html; charset=foo; boundary=\&quot;quotes_are_removed\&quot;&quot;</span>)
.<span class="ident">unwrap</span>();
@@ -68,7 +78,7 @@ charset - either the one explicitly specified or the default of &quot;us-ascii&q
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">ctype</span>.<span class="ident">params</span>.<span class="ident">get</span>(<span class="string">&quot;charset&quot;</span>), <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="string">&quot;foo&quot;</span>.<span class="ident">to_string</span>()));</pre>
<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">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">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>);
@@ -77,7 +87,7 @@ charset - either the one explicitly specified or the default of &quot;us-ascii&q
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">ctype</span>.<span class="ident">params</span>.<span class="ident">get</span>(<span class="string">&quot;charset&quot;</span>), <span class="prelude-val">None</span>);</pre>
<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">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">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>);
@@ -97,18 +107,22 @@ charset - either the one explicitly specified or the default of &quot;us-ascii&q
<h2>Keyboard Shortcuts</h2>
<dl>
- <dt>?</dt>
+ <dt><kbd>?</kbd></dt>
<dd>Show this help dialog</dd>
- <dt>S</dt>
+ <dt><kbd>S</kbd></dt>
<dd>Focus the search field</dd>
- <dt>&larrb;</dt>
+ <dt><kbd>↑</kbd></dt>
<dd>Move up in search results</dd>
- <dt>&rarrb;</dt>
+ <dt><kbd>↓</kbd></dt>
<dd>Move down in search results</dd>
- <dt>&#9166;</dt>
+ <dt><kbd>↹</kbd></dt>
+ <dd>Switch tab</dd>
+ <dt><kbd>&#9166;</kbd></dt>
<dd>Go to active search result</dd>
- <dt>+</dt>
- <dd>Collapse/expand all sections</dd>
+ <dt><kbd>+</kbd></dt>
+ <dd>Expand all sections</dd>
+ <dt><kbd>-</kbd></dt>
+ <dd>Collapse all sections</dd>
</dl>
</div>