diff options
Diffstat (limited to 'target/doc/mailparse/struct.ParsedMail.html')
-rw-r--r-- | target/doc/mailparse/struct.ParsedMail.html | 48 |
1 files changed, 36 insertions, 12 deletions
diff --git a/target/doc/mailparse/struct.ParsedMail.html b/target/doc/mailparse/struct.ParsedMail.html index e305953..3b84561 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-301' class='srclink' href='../src/mailparse/src/lib.rs.html#543-553' title='goto source code'>[src]</a></span></h1> + </span><a id='src-287' class='srclink' href='../src/mailparse/src/lib.rs.html#558-568' 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>, @@ -57,15 +57,21 @@ 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.</p> -</div><h2 class='fields'>Fields</h2> -<table><tr class='stab '> - <td id='structfield.headers'><code>headers</code></td><td><div class='docblock'><p>The headers for the message (or message subpart).</p> -</div></td></tr><tr class='stab '> - <td id='structfield.ctype'><code>ctype</code></td><td><div class='docblock'><p>The Content-Type information for the message (or message subpart).</p> -</div></td></tr><tr class='stab '> - <td id='structfield.subparts'><code>subparts</code></td><td><div class='docblock'><p>The subparts of this message or subpart. This vector is only non-empty +</div><h2 class='fields'>Fields</h2><span id='structfield.headers' class='structfield'> + <span id='headers.v' class='invisible'> + <code>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>></code> + </span></span><span class='stab '></span><div class='docblock'><p>The headers for the message (or message subpart).</p> +</div><span id='structfield.ctype' class='structfield'> + <span id='ctype.v' class='invisible'> + <code>ctype: <a class='struct' href='../mailparse/struct.ParsedContentType.html' title='mailparse::ParsedContentType'>ParsedContentType</a></code> + </span></span><span class='stab '></span><div class='docblock'><p>The Content-Type information for the message (or message subpart).</p> +</div><span id='structfield.subparts' class='structfield'> + <span id='subparts.v' class='invisible'> + <code>subparts: <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.ParsedMail.html' title='mailparse::ParsedMail'>ParsedMail</a><'a>></code> + </span></span><span class='stab '></span><div class='docblock'><p>The subparts of this message or subpart. This vector is only non-empty if ctype.mimetype starts with "multipart/".</p> -</div></td></tr></table><h2 id='methods'>Methods</h2><h3 class='impl'><code>impl<'a> <a class='struct' href='../mailparse/struct.ParsedMail.html' title='mailparse::ParsedMail'>ParsedMail</a><'a></code></h3><div class='impl-items'><h4 id='method.get_body' class='method'><code>fn <a href='#method.get_body' class='fnname'>get_body</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><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl<'a> <a class='struct' href='../mailparse/struct.ParsedMail.html' title='mailparse::ParsedMail'>ParsedMail</a><'a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-303' class='srclink' href='../src/mailparse/src/lib.rs.html#570-629' 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>(&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></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 the result into a Rust UTF-8 string using the charset in the Content-Type @@ -79,9 +85,25 @@ the result into a Rust UTF-8 string using the charset in the Content-Type <span class='string'>"\n"</span>, <span class='string'>"This is the body"</span>).<span class='ident'>as_bytes</span>()) .<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</span>().<span class='ident'>unwrap</span>(), <span class='string'>"This is the body"</span>);</pre> -</div></div><h2 id='implementations'>Trait Implementations</h2><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl<'a> <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../mailparse/struct.ParsedMail.html' title='mailparse::ParsedMail'>ParsedMail</a><'a></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4> -</div></section> + <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>p</span>.<span class='ident'>get_body</span>().<span class='ident'>unwrap</span>(), <span class='string'>"This is the body"</span>);<a class='test-arrow' target='_blank' href=''>Run</a></pre> +</div><h4 id='method.get_body_raw' class='method'><span id='get_body_raw.v' class='invisible'><code>fn <a href='#method.get_body_raw' class='fnname'>get_body_raw</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/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>>, <a class='enum' href='../mailparse/enum.MailParseError.html' title='mailparse::MailParseError'>MailParseError</a>></code></span></h4> +<div class='docblock'><p>Get the body of the message as a Rust Vec<u8>. This function tries to +unapply the Content-Transfer-Encoding if there is one, but won't do +any charset decoding.</p> + +<h1 id='examples-1' class='section-header'><a href='#examples-1'>Examples</a></h1> +<pre class='rust rust-example-rendered'> + <span class='kw'>use</span> <span class='ident'>mailparse</span>::<span class='ident'>parse_mail</span>; + <span class='kw'>let</span> <span class='ident'>p</span> <span class='op'>=</span> <span class='ident'>parse_mail</span>(<span class='macro'>concat</span><span class='macro'>!</span>( + <span class='string'>"Subject: test\n"</span>, + <span class='string'>"\n"</span>, + <span class='string'>"This is the body"</span>).<span class='ident'>as_bytes</span>()) + .<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"This is the body"</span>);<a class='test-arrow' target='_blank' href=''>Run</a></pre> +</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl<'a> <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../mailparse/struct.ParsedMail.html' title='mailparse::ParsedMail'>ParsedMail</a><'a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-293' class='srclink' href='../src/mailparse/src/lib.rs.html#557' 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>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></span></h4> +<div class='docblock'><p>Formats the value using the given formatter.</p> +</div></div></section> <section id='search' class="content hidden"></section> <section class="footer"></section> @@ -104,6 +126,8 @@ the result into a Rust UTF-8 string using the charset in the Content-Type <dd>Move down in search results</dd> <dt>⏎</dt> <dd>Go to active search result</dd> + <dt>+</dt> + <dd>Collapse/expand all sections</dd> </dl> </div> |