<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="Ariadne"><title>ariadne - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../static.files/rustdoc-5bc39a1768837dd0.css"><metaname="rustdoc-vars"data-root-path="../"data-static-root-path="../static.files/"data-current-crate="ariadne"data-themes=""data-resource-suffix=""data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)"data-channel="1.77.0"data-search-js="search-dd67cee4cfa65049.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../static.files/storage-4c98445ec4002617.js"></script><scriptdefersrc="../crates.js"></script><scriptdefersrc="../static.files/main-48f368f3872407c8.js"></script><noscript><linkrel="stylesheet"href="../static.files/noscript-04d5337699b92874.css"></noscript><linkrel="alternate icon"type="image/png"href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../static.files/favicon-2c020d218678b618.svg"></head><bodyclass="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle"title="show sidebar"></button></nav><navclass="sidebar"><divclass="sidebar-crate"><h2><ahref="../ariadne/index.html">ariadne</a><spanclass="version">0.4.0</span></h2></div><divclass="sidebar-elems"><ulclass="block">
<main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><divid="sidebar-button"tabindex="-1"><ahref="../ariadne/all.html"title="show sidebar"></a></div><inputclass="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"><divid="help-button"tabindex="-1"><ahref="../help.html"title="help">?</a></div><divid="settings-menu"tabindex="-1"><ahref="../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><sectionid="main-content"class="content"><divclass="main-heading"><h1>Crate <aclass="mod"href="#">ariadne</a><buttonid="copy-path"title="Copy item path to clipboard"><imgsrc="../static.files/clipboard-7571035ce49a181d.svg"width="19"height="18"alt="Copy item path"></button></h1><spanclass="out-of-band"><aclass="src"href="../src/ariadne/lib.rs.html#1-444">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><h2id="ariadne"><aclass="doc-anchor"href="#ariadne">§</a>Ariadne</h2>
<divclass="example-wrap ignore"><ahref="#"class="tooltip"title="This example is not tested">ⓘ</a><preclass="rust rust-example-rendered"><code><spanclass="kw">fn </span>main() {
<li><code>"concolor"</code> enables integration with the <ahref="https://crates.io/crates/concolor"><code>concolor</code></a> crate for global color output
control across your application</li>
<li><code>"auto-color"</code> enables <code>concolor</code>’s <code>"auto"</code> feature for automatic color control</li>
</ul>
<p><code>concolor</code>’s features should be defined by the top-level binary crate, but without any features enabled <code>concolor</code> does
nothing. If <code>ariadne</code> is your only dependency using <code>concolor</code> then <code>"auto-color"</code> provides a convenience to enable
<code>concolor</code>’s automatic color support detection, i.e. this:</p>
<p><code>@brendanzab</code> for their beautiful <ahref="https://github.com/brendanzab/codespan"><code>codespan</code></a> crate that inspired me to try
pushing the envelope of error diagnostics.</p>
</li>
<li>
<p><code>@estebank</code> for showing innumerable people just how good compiler diagnostics can be through their work on Rust.</p>
</div></details><h2id="structs"class="section-header">Structs<ahref="#structs"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="struct"href="struct.ColorGenerator.html"title="struct ariadne::ColorGenerator">ColorGenerator</a></div><divclass="desc docblock-short">A type that can generate distinct 8-bit colors.</div></li><li><divclass="item-name"><aclass="struct"href="struct.Config.html"title="struct ariadne::Config">Config</a></div><divclass="desc docblock-short">A type used to configure a report</div></li><li><divclass="item-name"><aclass="struct"href="struct.FileCache.html"title="struct ariadne::FileCache">FileCache</a></div><divclass="desc docblock-short">A <ahref="trait.Cache.html"title="trait ariadne::Cache"><code>Cache</code></a> that fetches <ahref="struct.Source.html"title="struct ariadne::Source"><code>Source</code></a>s from the filesystem.</div></li><li><divclass="item-name"><aclass="struct"href="struct.FnCache.html"title="struct ariadne::FnCache">FnCache</a></div><divclass="desc docblock-short">A <ahref="trait.Cache.html"title="trait ariadne::Cache"><code>Cache</code></a> that fetches <ahref="struct.Source.html"title="struct ariadne::Source"><code>Source</code></a>s using the provided function.</div></li><li><divclass="item-name"><aclass="struct"href="struct.Label.html"title="struct ariadne::Label">Label</a></div><divclass="desc docblock-short">A type that represents a labelled section of source code.</div></li><li><divclass="item-name"><aclass="struct"href="struct.Line.html"title="struct ariadne::Line">Line</a></div><divclass="desc docblock-short">A type representing a single line of a <ahref="struct.Source.html"title="struct ariadne::Source"><code>Source</code></a>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.Report.html"title="struct ariadne::Report">Report</a></div><divclass="desc docblock-short">A type representing a diagnostic that is ready to be written to output.</div></li><li><divclass="item-name"><aclass="struct"href="struct.ReportBuilder.html"title="struct ariadne::ReportBuilder">ReportBuilder</a></div><divclass="desc docblock-short">A type used to build a <ahref="struct.Report.html"title="struct ariadne::Report"><code>Report</code></a>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.Source.html"title="struct ariadne::Source">Source</a></div><divclass="desc docblock-short">A type representing a single source that may be referred to by <ahref="trait.Span.html"title="trait ariadne::Span"><code>Span</code></a>s.</div></li></ul><h2id="enums"class="section-header">Enums<ahref="#enums"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="enum"href="enum.CharSet.html"title="enum ariadne::CharSet">CharSet</a></div><divclass="desc docblock-short">Possible character sets to use when rendering diagnostics.</div></li><li><divclass="item-name"><aclass="enum"href="enum.Color.html"title="enum ariadne::Color">Color</a></div><divclass="desc docblock-short">An enum representing an ANSI color code.</div></li><li><divclass="item-name"><aclass="enum"href="enum.LabelAttach.html"title="enum ariadne::LabelAttach">LabelAttach</a></div><divclass="desc docblock-short">The attachment point of inline label arrows</div></li><li><divclass="item-name"><aclass="enum"href="enum.ReportKind.html"title="enum ariadne::ReportKind">ReportKind</a></div><divclass="desc docblock-short">A type that defines the kind of report being produced.</div></li></ul><h2id="traits"class="section-header">Traits<ahref="#traits"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="trait"href="trait.Cache.html"title="trait ariadne::Cache">Cache</a></div><divclass="desc docblock-short">A trait implemented by <ahref="struct.Source.html"title="struct ariadne::Source"><code>Source</code></a> caches.</div></li><li><divclass="item-name"><aclass="trait"href="trait.Fmt.html"title="trait ariadne::Fmt">Fmt</a></div><divclass="descdocb