mentat/pretty/enum.Doc.html

201 lines
34 KiB
HTML
Raw Permalink Normal View History

2018-08-22 17:04:13 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `Doc` enum in crate `pretty`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Doc">
<title>pretty::Doc - 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="../dark.css">
<link rel="stylesheet" type="text/css" href="../main.css" id="themeStyle">
<script src="../storage.js"></script>
</head>
<body class="rustdoc enum">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<div class="sidebar-menu">&#9776;</div>
<p class='location'>Enum Doc</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Nil">Nil</a><a href="#variant.Append">Append</a><a href="#variant.Group">Group</a><a href="#variant.Nest">Nest</a><a href="#variant.Space">Space</a><a href="#variant.Newline">Newline</a><a href="#variant.Text">Text</a></div><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.render">render</a><a href="#method.nil">nil</a><a href="#method.as_string">as_string</a><a href="#method.newline">newline</a><a href="#method.text">text</a><a href="#method.space">space</a><a href="#method.append">append</a><a href="#method.concat">concat</a><a href="#method.group">group</a><a href="#method.nest">nest</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Eq">Eq</a><a href="#impl-Ord">Ord</a><a href="#impl-PartialEq">PartialEq</a><a href="#impl-PartialOrd">PartialOrd</a><a href="#impl-From%3CS%3E">From&lt;S&gt;</a><a href="#impl-Into%3CDoc%3C%27a%2C%20A%3A%3ADoc%3E%3E">Into&lt;Doc&lt;&#39;a, A::Doc&gt;&gt;</a></div></div><p class='location'><a href='index.html'>pretty</a></p><script>window.sidebarCurrent = {name: 'Doc', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
</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">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content">
<h1 class='fqn'><span class='in-band'>Enum <a href='index.html'>pretty</a>::<wbr><a class="enum" href=''>Doc</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/pretty/doc.rs.html#20-28' title='goto source code'>[src]</a></span></h1>
<pre class='rust enum'>pub enum Doc&lt;'a, B&gt; {
Nil,
Append(B,&nbsp;B),
Group(B),
Nest(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,&nbsp;B),
Space,
Newline,
Text(<a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a>&lt;'a, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt;),
}</pre><div class='docblock'><p>The concrete document type. This type is not meant to be used directly. Instead use the static
functions on <code>Doc</code> or the methods on an <code>DocAllocator</code>.</p>
<p>The <code>B</code> parameter is used to abstract over pointers to <code>Doc</code>. See <code>RefDoc</code> and <code>BoxDoc</code> for how
it is used</p>
</div><h2 id='variants' class='variants small-section-header'>
Variants<a href='#variants' class='anchor'></a></h2>
<span id="variant.Nil" class="variant small-section-header"><a href="#variant.Nil" class="anchor field"></a><span id='Nil.v' class='invisible'><code>Nil</code></span></span><span id="variant.Append" class="variant small-section-header"><a href="#variant.Append" class="anchor field"></a><span id='Append.v' class='invisible'><code>Append(B,&nbsp;B)</code></span></span><span id="variant.Group" class="variant small-section-header"><a href="#variant.Group" class="anchor field"></a><span id='Group.v' class='invisible'><code>Group(B)</code></span></span><span id="variant.Nest" class="variant small-section-header"><a href="#variant.Nest" class="anchor field"></a><span id='Nest.v' class='invisible'><code>Nest(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,&nbsp;B)</code></span></span><span id="variant.Space" class="variant small-section-header"><a href="#variant.Space" class="anchor field"></a><span id='Space.v' class='invisible'><code>Space</code></span></span><span id="variant.Newline" class="variant small-section-header"><a href="#variant.Newline" class="anchor field"></a><span id='Newline.v' class='invisible'><code>Newline</code></span></span><span id="variant.Text" class="variant small-section-header"><a href="#variant.Text" class="anchor field"></a><span id='Text.v' class='invisible'><code>Text(<a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a>&lt;'a, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt;)</code></span></span>
<h2 id='methods' class='small-section-header'>
Methods<a href='#methods' class='anchor'></a>
</h2>
<h3 id='impl' class='impl'><span class='in-band'><code>impl&lt;'a, B&gt; <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;</code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#38-46' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.render' class="method"><span id='render.v' class='invisible'><code>pub fn <a href='#method.render' class='fnname'>render</a>&lt;'b, W:&nbsp;?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;'b self, <br>&nbsp;&nbsp;&nbsp;&nbsp;width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;out: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>W<br>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>&lt;Target = <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'b, B&gt;&gt;,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#41-45' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Writes a rendered document.</p>
</div></div><h3 id='impl-1' class='impl'><span class='in-band'><code>impl&lt;'a, B&gt; <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;</code><a href='#impl-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/lib.rs.html#182-209' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.nil' class="method"><span id='nil.v' class='invisible'><code>pub fn <a href='#method.nil' class='fnname'>nil</a>() -&gt; <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/lib.rs.html#184-186' title='goto source code'>[src]</a></span></h4>
<h4 id='method.as_string' class="method"><span id='as_string.v' class='invisible'><code>pub fn <a href='#method.as_string' class='fnname'>as_string</a>&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a>&gt;(t: T) -&gt; <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/lib.rs.html#189-191' title='goto source code'>[src]</a></span></h4>
<h4 id='method.newline' class="method"><span id='newline.v' class='invisible'><code>pub fn <a href='#method.newline' class='fnname'>newline</a>() -&gt; <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/lib.rs.html#194-196' title='goto source code'>[src]</a></span></h4>
<h4 id='method.text' class="method"><span id='text.v' class='invisible'><code>pub fn <a href='#method.text' class='fnname'>text</a>&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a>&lt;'a, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt;&gt;&gt;(data: T) -&gt; <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/lib.rs.html#199-203' title='goto source code'>[src]</a></span></h4>
<h4 id='method.space' class="method"><span id='space.v' class='invisible'><code>pub fn <a href='#method.space' class='fnname'>space</a>() -&gt; <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/lib.rs.html#206-208' title='goto source code'>[src]</a></span></h4>
</div><h3 id='impl-2' class='impl'><span class='in-band'><code>impl&lt;'a&gt; <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, <a class="struct" href="../pretty/struct.BoxDoc.html" title="struct pretty::BoxDoc">BoxDoc</a>&lt;'a&gt;&gt;</code><a href='#impl-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/lib.rs.html#211-233' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.append' class="method"><span id='append.v' class='invisible'><code>pub fn <a href='#method.append' class='fnname'>append</a>(self, that: <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, <a class="struct" href="../pretty/struct.BoxDoc.html" title="struct pretty::BoxDoc">BoxDoc</a>&lt;'a&gt;&gt;) -&gt; <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, <a class="struct" href="../pretty/struct.BoxDoc.html" title="struct pretty::BoxDoc">BoxDoc</a>&lt;'a&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/lib.rs.html#213-215' title='goto source code'>[src]</a></span></h4>
<h4 id='method.concat' class="method"><span id='concat.v' class='invisible'><code>pub fn <a href='#method.concat' class='fnname'>concat</a>&lt;I&gt;(&amp;'a self, docs: I) -&gt; <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, <a class="struct" href="../pretty/struct.BoxDoc.html" title="struct pretty::BoxDoc">BoxDoc</a>&lt;'a&gt;&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a>&lt;Item = <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, <a class="struct" href="../pretty/struct.BoxDoc.html" title="struct pretty::BoxDoc">BoxDoc</a>&lt;'a&gt;&gt;&gt;,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/lib.rs.html#218-222' title='goto source code'>[src]</a></span></h4>
<h4 id='method.group' class="method"><span id='group.v' class='invisible'><code>pub fn <a href='#method.group' class='fnname'>group</a>(self) -&gt; <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, <a class="struct" href="../pretty/struct.BoxDoc.html" title="struct pretty::BoxDoc">BoxDoc</a>&lt;'a&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/lib.rs.html#225-227' title='goto source code'>[src]</a></span></h4>
<h4 id='method.nest' class="method"><span id='nest.v' class='invisible'><code>pub fn <a href='#method.nest' class='fnname'>nest</a>(self, offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, <a class="struct" href="../pretty/struct.BoxDoc.html" title="struct pretty::BoxDoc">BoxDoc</a>&lt;'a&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/lib.rs.html#230-232' title='goto source code'>[src]</a></span></h4>
</div>
<h2 id='implementations' class='small-section-header'>
Trait Implementations<a href='#implementations' class='anchor'></a>
</h2>
<h3 id='impl-Clone' class='impl'><span class='in-band'><code>impl&lt;'a, B:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;</code><a href='#impl-Clone' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#19' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#19' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method"><span id='clone_from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#112-114' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><span class='in-band'><code>impl&lt;'a, B:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;</code><a href='#impl-Debug' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#19' 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>(&amp;self, __arg_0: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#19' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-Eq' class='impl'><span class='in-band'><code>impl&lt;'a, B:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;</code><a href='#impl-Eq' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#19' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div><h3 id='impl-Ord' class='impl'><span class='in-band'><code>impl&lt;'a, B:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;</code><a href='#impl-Ord' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#19' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.cmp' class="method"><span id='cmp.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp' class='fnname'>cmp</a>(&amp;self, __arg_0: &amp;<a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#19' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method returns an <code>Ordering</code> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></p>
</div><h4 id='method.max' class="method"><span id='max.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max' class='fnname'>max</a>(self, other: Self) -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.21.0'>1.21.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#460-463' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read more</a></p>
</div><h4 id='method.min' class="method"><span id='min.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min' class='fnname'>min</a>(self, other: Self) -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.21.0'>1.21.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#476-479' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read more</a></p>
</div></div><h3 id='impl-PartialEq' class='impl'><span class='in-band'><code>impl&lt;'a, B:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;</code><a href='#impl-PartialEq' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#19' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq' class="method"><span id='eq.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, __arg_0: &amp;<a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#19' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class="method"><span id='ne.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, __arg_0: &amp;<a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#19' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-PartialOrd' class='impl'><span class='in-band'><code>impl&lt;'a, B:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;</code><a href='#impl-PartialOrd' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#19' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.partial_cmp' class="method"><span id='partial_cmp.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp' class='fnname'>partial_cmp</a>(&amp;self, __arg_0: &amp;<a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#19' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4 id='method.lt' class="method"><span id='lt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt' class='fnname'>lt</a>(&amp;self, __arg_0: &amp;<a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#19' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4 id='method.le' class="method"><span id='le.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le' class='fnname'>le</a>(&amp;self, __arg_0: &amp;<a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#19' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4 id='method.gt' class="method"><span id='gt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt' class='fnname'>gt</a>(&amp;self, __arg_0: &amp;<a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#19' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4 id='method.ge' class="method"><span id='ge.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge' class='fnname'>ge</a>(&amp;self, __arg_0: &amp;<a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#19' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3 id='impl-From%3CS%3E' class='impl'><span class='in-band'><code>impl&lt;'a, B, S&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;S&gt; for <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a>&lt;'a, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt;&gt;,&nbsp;</span></code><a href='#impl-From%3CS%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#30-36' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from' class="method"><span id='from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(s: S) -&gt; <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, B&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/doc.rs.html#33-35' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 id='impl-Into%3CDoc%3C%27a%2C%20A%3A%3ADoc%3E%3E' class='impl'><span class='in-band'><code>impl&lt;'a, A:&nbsp;?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, A::<a class="type" href="../pretty/trait.DocAllocator.html#associatedtype.Doc" title="type pretty::DocAllocator::Doc">Doc</a>&gt;&gt; for <a class="struct" href="../pretty/struct.DocBuilder.html" title="struct pretty::DocBuilder">DocBuilder</a>&lt;'a, A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../pretty/trait.DocAllocator.html" title="trait pretty::DocAllocator">DocAllocator</a>&lt;'a&gt;,&nbsp;</span></code><a href='#impl-Into%3CDoc%3C%27a%2C%20A%3A%3ADoc%3E%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/lib.rs.html#50-56' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.into' class="method"><span id='into.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -&gt; <a class="enum" href="../pretty/enum.Doc.html" title="enum pretty::Doc">Doc</a>&lt;'a, A::<a class="type" href="../pretty/trait.DocAllocator.html#associatedtype.Doc" title="type pretty::DocAllocator::Doc">Doc</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/pretty/lib.rs.html#53-55' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt><kbd>?</kbd></dt>
<dd>Show this help dialog</dd>
<dt><kbd>S</kbd></dt>
<dd>Focus the search field</dd>
<dt><kbd></kbd></dt>
<dd>Move up in search results</dd>
<dt><kbd></kbd></dt>
<dd>Move down in search results</dd>
<dt><kbd></kbd></dt>
<dd>Switch tab</dd>
<dt><kbd>&#9166;</kbd></dt>
<dd>Go to active search result</dd>
<dt><kbd>+</kbd></dt>
<dd>Expand all sections</dd>
<dt><kbd>-</kbd></dt>
<dd>Collapse all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../";
window.currentCrate = "pretty";
</script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>