edlang/color_eyre/section/trait.Section.html
2024-02-13 06:38:44 +00:00

161 lines
52 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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="A helper trait for attaching informational sections to error reports to be displayed after the chain of errors"><title>Section in color_eyre::section - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="color_eyre" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../color_eyre/index.html">color_eyre</a><span class="version">0.6.2</span></h2></div><h2 class="location"><a href="#">Section</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Return">Return</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.error">error</a></li><li><a href="#tymethod.note">note</a></li><li><a href="#tymethod.section">section</a></li><li><a href="#tymethod.suggestion">suggestion</a></li><li><a href="#tymethod.warning">warning</a></li><li><a href="#tymethod.with_error">with_error</a></li><li><a href="#tymethod.with_note">with_note</a></li><li><a href="#tymethod.with_section">with_section</a></li><li><a href="#tymethod.with_suggestion">with_suggestion</a></li><li><a href="#tymethod.with_warning">with_warning</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Section-for-Report">Report</a></li><li><a href="#impl-Section-for-Result%3CT,+E%3E">Result&lt;T, E&gt;</a></li></ul><h3><a href="#object-safety">Object Safety</a></h3><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In color_eyre::section</a></h2></div></nav><div class="sidebar-resizer"></div>
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../color_eyre/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../index.html">color_eyre</a>::<wbr><a href="index.html">section</a>::<wbr><a class="trait" href="#">Section</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/color_eyre/section/mod.rs.html#135-318">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait Section: Sealed {
type <a href="#associatedtype.Return" class="associatedtype">Return</a>;
// Required methods
fn <a href="#tymethod.section" class="fn">section</a>&lt;D&gt;(self, section: D) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a>
<span class="where">where D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static</span>;
<span class="item-spacer"></span> fn <a href="#tymethod.with_section" class="fn">with_section</a>&lt;D, F&gt;(self, section: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a>
<span class="where">where D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; D</span>;
<span class="item-spacer"></span> fn <a href="#tymethod.error" class="fn">error</a>&lt;E&gt;(self, error: E) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a>
<span class="where">where E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static</span>;
<span class="item-spacer"></span> fn <a href="#tymethod.with_error" class="fn">with_error</a>&lt;E, F&gt;(self, error: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a>
<span class="where">where F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; E,
E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static</span>;
<span class="item-spacer"></span> fn <a href="#tymethod.note" class="fn">note</a>&lt;D&gt;(self, note: D) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a>
<span class="where">where D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static</span>;
<span class="item-spacer"></span> fn <a href="#tymethod.with_note" class="fn">with_note</a>&lt;D, F&gt;(self, f: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a>
<span class="where">where D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; D</span>;
<span class="item-spacer"></span> fn <a href="#tymethod.warning" class="fn">warning</a>&lt;D&gt;(self, warning: D) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a>
<span class="where">where D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static</span>;
<span class="item-spacer"></span> fn <a href="#tymethod.with_warning" class="fn">with_warning</a>&lt;D, F&gt;(self, f: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a>
<span class="where">where D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; D</span>;
<span class="item-spacer"></span> fn <a href="#tymethod.suggestion" class="fn">suggestion</a>&lt;D&gt;(self, suggestion: D) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a>
<span class="where">where D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static</span>;
<span class="item-spacer"></span> fn <a href="#tymethod.with_suggestion" class="fn">with_suggestion</a>&lt;D, F&gt;(self, f: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a>
<span class="where">where D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; D</span>;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A helper trait for attaching informational sections to error reports to be
displayed after the chain of errors</p>
<h2 id="details"><a href="#details">Details</a></h2>
<p><code>color_eyre</code> provides two types of help text that can be attached to error reports: custom
sections and pre-configured sections. Custom sections are added via the <code>section</code> and
<code>with_section</code> methods, and give maximum control over formatting.</p>
<p>The pre-configured sections are provided via <code>suggestion</code>, <code>warning</code>, and <code>note</code>. These
sections are displayed after all other sections with no extra newlines between subsequent Help
sections. They consist only of a header portion and are prepended with a colored string
indicating the kind of section, e.g. `Note: This might have failed due to …“</p>
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Return" class="method"><a class="src rightside" href="../../src/color_eyre/section/mod.rs.html#137">source</a><h4 class="code-header">type <a href="#associatedtype.Return" class="associatedtype">Return</a></h4></section></summary><div class="docblock"><p>The return type of each method after adding context</p>
</div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.section" class="method"><a class="src rightside" href="../../src/color_eyre/section/mod.rs.html#157-159">source</a><h4 class="code-header">fn <a href="#tymethod.section" class="fn">section</a>&lt;D&gt;(self, section: D) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section></summary><div class="docblock"><p>Add a section to an error report, to be displayed after the chain of errors.</p>
<h5 id="details-1"><a href="#details-1">Details</a></h5>
<p>Sections are displayed in the order they are added to the error report. They are displayed
immediately after the <code>Error:</code> section and before the <code>SpanTrace</code> and <code>Backtrace</code> sections.
They consist of a header and an optional body. The body of the section is indented by
default.</p>
<h5 id="examples"><a href="#examples">Examples</a></h5>
<div class="example-wrap should_panic"><a href="#" class="tooltip" title="This example panics"></a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>color_eyre::{eyre::eyre, eyre::Report, Section};
<span class="prelude-val">Err</span>(<span class="macro">eyre!</span>(<span class="string">"command failed"</span>))
.section(<span class="string">"Please report bugs to https://real.url/bugs"</span>)<span class="question-mark">?</span>;</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.with_section" class="method"><a class="src rightside" href="../../src/color_eyre/section/mod.rs.html#183-186">source</a><h4 class="code-header">fn <a href="#tymethod.with_section" class="fn">with_section</a>&lt;D, F&gt;(self, section: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; D,</div></h4></section></summary><div class="docblock"><p>Add a Section to an error report, to be displayed after the chain of errors. The closure to
create the Section is lazily evaluated only in the case of an error.</p>
<h5 id="examples-1"><a href="#examples-1">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>color_eyre::{eyre::eyre, eyre::Report, Section, SectionExt};
<span class="kw">let </span>output = std::process::Command::new(<span class="string">"ls"</span>)
.output()<span class="question-mark">?</span>;
<span class="kw">let </span>output = <span class="kw">if </span>!output.status.success() {
<span class="kw">let </span>stderr = String::from_utf8_lossy(<span class="kw-2">&amp;</span>output.stderr);
<span class="prelude-val">Err</span>(<span class="macro">eyre!</span>(<span class="string">"cmd exited with non-zero status code"</span>))
.with_section(<span class="kw">move </span>|| stderr.trim().to_string().header(<span class="string">"Stderr:"</span>))<span class="question-mark">?
</span>} <span class="kw">else </span>{
String::from_utf8_lossy(<span class="kw-2">&amp;</span>output.stdout)
};
<span class="macro">println!</span>(<span class="string">"{}"</span>, output);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.error" class="method"><a class="src rightside" href="../../src/color_eyre/section/mod.rs.html#206-208">source</a><h4 class="code-header">fn <a href="#tymethod.error" class="fn">error</a>&lt;E&gt;(self, error: E) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section></summary><div class="docblock"><p>Add an error section to an error report, to be displayed after the primary error message
section.</p>
<h5 id="examples-2"><a href="#examples-2">Examples</a></h5>
<div class="example-wrap should_panic"><a href="#" class="tooltip" title="This example panics"></a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>color_eyre::{eyre::eyre, eyre::Report, Section};
<span class="kw">use </span>thiserror::Error;
<span class="attr">#[derive(Debug, Error)]
#[error(<span class="string">"{0}"</span>)]
</span><span class="kw">struct </span>StrError(<span class="kw-2">&amp;</span><span class="lifetime">'static </span>str);
<span class="prelude-val">Err</span>(<span class="macro">eyre!</span>(<span class="string">"command failed"</span>))
.error(StrError(<span class="string">"got one error"</span>))
.error(StrError(<span class="string">"got a second error"</span>))<span class="question-mark">?</span>;</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.with_error" class="method"><a class="src rightside" href="../../src/color_eyre/section/mod.rs.html#228-231">source</a><h4 class="code-header">fn <a href="#tymethod.with_error" class="fn">with_error</a>&lt;E, F&gt;(self, error: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; E,
E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section></summary><div class="docblock"><p>Add an error section to an error report, to be displayed after the primary error message
section. The closure to create the Section is lazily evaluated only in the case of an error.</p>
<h5 id="examples-3"><a href="#examples-3">Examples</a></h5>
<div class="example-wrap should_panic"><a href="#" class="tooltip" title="This example panics"></a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>color_eyre::{eyre::eyre, eyre::Report, Section};
<span class="kw">use </span>thiserror::Error;
<span class="attr">#[derive(Debug, Error)]
#[error(<span class="string">"{0}"</span>)]
</span><span class="kw">struct </span>StringError(String);
<span class="prelude-val">Err</span>(<span class="macro">eyre!</span>(<span class="string">"command failed"</span>))
.with_error(|| StringError(<span class="string">"got one error"</span>.into()))
.with_error(|| StringError(<span class="string">"got a second error"</span>.into()))<span class="question-mark">?</span>;</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.note" class="method"><a class="src rightside" href="../../src/color_eyre/section/mod.rs.html#258-260">source</a><h4 class="code-header">fn <a href="#tymethod.note" class="fn">note</a>&lt;D&gt;(self, note: D) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section></summary><div class="docblock"><p>Add a Note to an error report, to be displayed after the chain of errors.</p>
<h5 id="examples-4"><a href="#examples-4">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>color_eyre::Section <span class="kw">as _</span>;
fallible_fn().note(<span class="string">"This might have failed due to ..."</span>)<span class="question-mark">?</span>;</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.with_note" class="method"><a class="src rightside" href="../../src/color_eyre/section/mod.rs.html#290-293">source</a><h4 class="code-header">fn <a href="#tymethod.with_note" class="fn">with_note</a>&lt;D, F&gt;(self, f: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; D,</div></h4></section></summary><div class="docblock"><p>Add a Note to an error report, to be displayed after the chain of errors. The closure to
create the Note is lazily evaluated only in the case of an error.</p>
<h5 id="examples-5"><a href="#examples-5">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>color_eyre::Section <span class="kw">as _</span>;
fallible_fn().with_note(|| {
<span class="macro">format!</span>(<span class="string">"This might have failed due to ... It has failed {} times"</span>, <span class="number">100</span>)
})<span class="question-mark">?</span>;</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.warning" class="method"><a class="src rightside" href="../../src/color_eyre/section/mod.rs.html#296-298">source</a><h4 class="code-header">fn <a href="#tymethod.warning" class="fn">warning</a>&lt;D&gt;(self, warning: D) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section></summary><div class="docblock"><p>Add a Warning to an error report, to be displayed after the chain of errors.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.with_warning" class="method"><a class="src rightside" href="../../src/color_eyre/section/mod.rs.html#302-305">source</a><h4 class="code-header">fn <a href="#tymethod.with_warning" class="fn">with_warning</a>&lt;D, F&gt;(self, f: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; D,</div></h4></section></summary><div class="docblock"><p>Add a Warning to an error report, to be displayed after the chain of errors. The closure to
create the Warning is lazily evaluated only in the case of an error.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.suggestion" class="method"><a class="src rightside" href="../../src/color_eyre/section/mod.rs.html#308-310">source</a><h4 class="code-header">fn <a href="#tymethod.suggestion" class="fn">suggestion</a>&lt;D&gt;(self, suggestion: D) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section></summary><div class="docblock"><p>Add a Suggestion to an error report, to be displayed after the chain of errors.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.with_suggestion" class="method"><a class="src rightside" href="../../src/color_eyre/section/mod.rs.html#314-317">source</a><h4 class="code-header">fn <a href="#tymethod.with_suggestion" class="fn">with_suggestion</a>&lt;D, F&gt;(self, f: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; D,</div></h4></section></summary><div class="docblock"><p>Add a Suggestion to an error report, to be displayed after the chain of errors. The closure
to create the Suggestion is lazily evaluated only in the case of an error.</p>
</div></details></div><h2 id="object-safety" class="section-header">Object Safety<a href="#object-safety" class="anchor">§</a></h2><div class="object-safety-info">This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.76.0/reference/items/traits.html#object-safety">object safe</a>.</div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-Section-for-Report" class="impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#12-145">source</a><a href="#impl-Section-for-Report" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Section.html" title="trait color_eyre::section::Section">Section</a> for <a class="struct" href="../../eyre/struct.Report.html" title="struct eyre::Report">Report</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Return-1" class="associatedtype trait-impl"><a href="#associatedtype.Return-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Return" class="associatedtype">Return</a> = <a class="struct" href="../../eyre/struct.Report.html" title="struct eyre::Report">Report</a></h4></section><section id="method.note" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#15-26">source</a><a href="#method.note" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.note" class="fn">note</a>&lt;D&gt;(self, note: D) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section><section id="method.with_note" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#28-40">source</a><a href="#method.with_note" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.with_note" class="fn">with_note</a>&lt;D, F&gt;(self, note: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; D,</div></h4></section><section id="method.warning" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#42-53">source</a><a href="#method.warning" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.warning" class="fn">warning</a>&lt;D&gt;(self, warning: D) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section><section id="method.with_warning" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#55-67">source</a><a href="#method.with_warning" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.with_warning" class="fn">with_warning</a>&lt;D, F&gt;(self, warning: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; D,</div></h4></section><section id="method.suggestion" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#69-80">source</a><a href="#method.suggestion" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.suggestion" class="fn">suggestion</a>&lt;D&gt;(self, suggestion: D) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section><section id="method.with_suggestion" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#82-94">source</a><a href="#method.with_suggestion" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.with_suggestion" class="fn">with_suggestion</a>&lt;D, F&gt;(self, suggestion: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; D,</div></h4></section><section id="method.with_section" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#96-107">source</a><a href="#method.with_section" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.with_section" class="fn">with_section</a>&lt;D, F&gt;(self, section: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; D,</div></h4></section><section id="method.section" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#109-119">source</a><a href="#method.section" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.section" class="fn">section</a>&lt;D&gt;(self, section: D) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section><section id="method.error" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#121-131">source</a><a href="#method.error" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.error" class="fn">error</a>&lt;E2&gt;(self, error: E2) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
E2: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section><section id="method.with_error" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#133-144">source</a><a href="#method.with_error" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.with_error" class="fn">with_error</a>&lt;E2, F&gt;(self, error: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; E2,
E2: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Section-for-Result%3CT,+E%3E" class="impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#147-237">source</a><a href="#impl-Section-for-Result%3CT,+E%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T, E&gt; <a class="trait" href="trait.Section.html" title="trait color_eyre::section::Section">Section</a> for <a class="type" href="../../eyre/type.Result.html" title="type eyre::Result">Result</a>&lt;T, E&gt;<div class="where">where
E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../../eyre/struct.Report.html" title="struct eyre::Report">Report</a>&gt;,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Return-2" class="associatedtype trait-impl"><a href="#associatedtype.Return-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Return" class="associatedtype">Return</a> = <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, <a class="struct" href="../../eyre/struct.Report.html" title="struct eyre::Report">Report</a>&gt;</h4></section><section id="method.note-1" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#153-159">source</a><a href="#method.note-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.note" class="fn">note</a>&lt;D&gt;(self, note: D) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section><section id="method.with_note-1" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#161-168">source</a><a href="#method.with_note-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.with_note" class="fn">with_note</a>&lt;D, F&gt;(self, note: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; D,</div></h4></section><section id="method.warning-1" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#170-176">source</a><a href="#method.warning-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.warning" class="fn">warning</a>&lt;D&gt;(self, warning: D) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section><section id="method.with_warning-1" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#178-185">source</a><a href="#method.with_warning-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.with_warning" class="fn">with_warning</a>&lt;D, F&gt;(self, warning: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; D,</div></h4></section><section id="method.suggestion-1" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#187-193">source</a><a href="#method.suggestion-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.suggestion" class="fn">suggestion</a>&lt;D&gt;(self, suggestion: D) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section><section id="method.with_suggestion-1" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#195-202">source</a><a href="#method.with_suggestion-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.with_suggestion" class="fn">with_suggestion</a>&lt;D, F&gt;(self, suggestion: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; D,</div></h4></section><section id="method.with_section-1" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#204-211">source</a><a href="#method.with_section-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.with_section" class="fn">with_section</a>&lt;D, F&gt;(self, section: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; D,</div></h4></section><section id="method.section-1" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#213-219">source</a><a href="#method.section-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.section" class="fn">section</a>&lt;D&gt;(self, section: D) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
D: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section><section id="method.error-1" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#221-227">source</a><a href="#method.error-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.error" class="fn">error</a>&lt;E2&gt;(self, error: E2) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
E2: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section><section id="method.with_error-1" class="method trait-impl"><a class="src rightside" href="../../src/color_eyre/section/help.rs.html#229-236">source</a><a href="#method.with_error-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.with_error" class="fn">with_error</a>&lt;E2, F&gt;(self, error: F) -&gt; Self::<a class="associatedtype" href="trait.Section.html#associatedtype.Return" title="type color_eyre::section::Section::Return">Return</a><div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; E2,
E2: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../trait.impl/color_eyre/section/trait.Section.js" data-ignore-extern-crates="eyre" async></script></section></div></main></body></html>