|
1 | 1 | <!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="Formatted compiler error type undefined value `x` –> file.leo: 2:8 | 2 | let a = x; | ^ | = help: Initialize a variable `x` first. Makes use of the same fields as a BacktracedError."><title>Formatted in leo_errors::common::formatted - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="leo_errors" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Formatted</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../leo_errors/index.html">leo_<wbr>errors</a><span class="version">3.3.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Formatted</a></h2><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield.backtrace" title="backtrace">backtrace</a></li><li><a href="#structfield.labels" title="labels">labels</a></li><li><a href="#structfield.span" title="span">span</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.error_code" title="error_code">error_code</a></li><li><a href="#method.exit_code" title="exit_code">exit_code</a></li><li><a href="#method.new_from_span" title="new_from_span">new_from_span</a></li><li><a href="#method.warning_code" title="warning_code">warning_code</a></li><li><a href="#method.with_labels" title="with_labels">with_labels</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Formatted" title="Clone">Clone</a></li><li><a href="#impl-Debug-for-Formatted" title="Debug">Debug</a></li><li><a href="#impl-Display-for-Formatted" title="Display">Display</a></li><li><a href="#impl-Eq-for-Formatted" title="Eq">Eq</a></li><li><a href="#impl-Error-for-Formatted" title="Error">Error</a></li><li><a href="#impl-From%3CFormatted%3E-for-AstError" title="From<Formatted>">From<Formatted></a></li><li><a href="#impl-From%3CFormatted%3E-for-CliError" title="From<Formatted>">From<Formatted></a></li><li><a href="#impl-From%3CFormatted%3E-for-CompilerError" title="From<Formatted>">From<Formatted></a></li><li><a href="#impl-From%3CFormatted%3E-for-FlattenError" title="From<Formatted>">From<Formatted></a></li><li><a href="#impl-From%3CFormatted%3E-for-LoopUnrollerError" title="From<Formatted>">From<Formatted></a></li><li><a href="#impl-From%3CFormatted%3E-for-NameValidationError" title="From<Formatted>">From<Formatted></a></li><li><a href="#impl-From%3CFormatted%3E-for-PackageError" title="From<Formatted>">From<Formatted></a></li><li><a href="#impl-From%3CFormatted%3E-for-ParserError" title="From<Formatted>">From<Formatted></a></li><li><a href="#impl-From%3CFormatted%3E-for-ParserWarning" title="From<Formatted>">From<Formatted></a></li><li><a href="#impl-From%3CFormatted%3E-for-StaticAnalyzerError" title="From<Formatted>">From<Formatted></a></li><li><a href="#impl-From%3CFormatted%3E-for-StaticAnalyzerWarning" title="From<Formatted>">From<Formatted></a></li><li><a href="#impl-From%3CFormatted%3E-for-TypeCheckerError" title="From<Formatted>">From<Formatted></a></li><li><a href="#impl-From%3CFormatted%3E-for-TypeCheckerWarning" title="From<Formatted>">From<Formatted></a></li><li><a href="#impl-From%3CFormatted%3E-for-UtilError" title="From<Formatted>">From<Formatted></a></li><li><a href="#impl-Hash-for-Formatted" title="Hash">Hash</a></li><li><a href="#impl-PartialEq-for-Formatted" title="PartialEq">PartialEq</a></li><li><a href="#impl-StructuralPartialEq-for-Formatted" title="StructuralPartialEq">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-Formatted" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-Formatted" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Formatted" title="Send">Send</a></li><li><a href="#impl-Sync-for-Formatted" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-Formatted" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Formatted" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow<T>">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut<T>">BorrowMut<T></a></li><li><a href="#impl-CloneToUninit-for-T" title="CloneToUninit">CloneToUninit</a></li><li><a href="#impl-Equivalent%3CK%3E-for-Q" title="Equivalent<K>">Equivalent<K></a></li><li><a href="#impl-From%3CT%3E-for-T" title="From<T>">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into<U>">Into<U></a></li><li><a href="#impl-IntoEither-for-T" title="IntoEither">IntoEither</a></li><li><a href="#impl-Pointable-for-T" title="Pointable">Pointable</a></li><li><a href="#impl-ToOwned-for-T" title="ToOwned">ToOwned</a></li><li><a href="#impl-ToString-for-T" title="ToString">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom<U>">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto<U>">TryInto<U></a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In leo_<wbr>errors::<wbr>common::<wbr>formatted</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">leo_errors</a>::<wbr><a href="../index.html">common</a>::<wbr><a href="index.html">formatted</a></div><h1>Struct <span class="struct">Formatted</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/leo_errors/common/formatted.rs.html#86-93">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Formatted { |
2 | | - pub span: <a class="struct" href="../../../leo_span/span/struct.Span.html" title="struct leo_span::span::Span">Span</a>, |
| 2 | + pub span: Span, |
3 | 3 | pub labels: <a class="struct" href="https://doc.rust-lang.org/1.91.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../struct.Label.html" title="struct leo_errors::Label">Label</a>>, |
4 | 4 | pub backtrace: <a class="struct" href="https://doc.rust-lang.org/1.91.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><<a class="struct" href="../../struct.Backtraced.html" title="struct leo_errors::Backtraced">Backtraced</a>>, |
5 | 5 | }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Formatted compiler error type |
|
11 | 11 | | |
12 | 12 | = help: Initialize a variable <code>x</code> first. |
13 | 13 | Makes use of the same fields as a BacktracedError.</p> |
14 | | -</div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.span" class="structfield section-header"><a href="#structfield.span" class="anchor field">§</a><code>span: <a class="struct" href="../../../leo_span/span/struct.Span.html" title="struct leo_span::span::Span">Span</a></code></span><div class="docblock"><p>The formatted error span information.</p> |
| 14 | +</div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.span" class="structfield section-header"><a href="#structfield.span" class="anchor field">§</a><code>span: Span</code></span><div class="docblock"><p>The formatted error span information.</p> |
15 | 15 | </div><span id="structfield.labels" class="structfield section-header"><a href="#structfield.labels" class="anchor field">§</a><code>labels: <a class="struct" href="https://doc.rust-lang.org/1.91.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../struct.Label.html" title="struct leo_errors::Label">Label</a>></code></span><div class="docblock"><p>Additional spans with labels and optional colors for multi-span errors.</p> |
16 | 16 | </div><span id="structfield.backtrace" class="structfield section-header"><a href="#structfield.backtrace" class="anchor field">§</a><code>backtrace: <a class="struct" href="https://doc.rust-lang.org/1.91.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><<a class="struct" href="../../struct.Backtraced.html" title="struct leo_errors::Backtraced">Backtraced</a>></code></span><div class="docblock"><p>The backtrace to track where the Leo error originated.</p> |
17 | 17 | </div><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Formatted" class="impl"><a class="src rightside" href="../../../src/leo_errors/common/formatted.rs.html#95-146">Source</a><a href="#impl-Formatted" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="../../struct.Formatted.html" title="struct leo_errors::Formatted">Formatted</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new_from_span" class="method"><a class="src rightside" href="../../../src/leo_errors/common/formatted.rs.html#98-124">Source</a><h4 class="code-header">pub fn <a href="#method.new_from_span" class="fn">new_from_span</a><S>( |
|
21 | 21 | code_identifier: <a class="primitive" href="https://doc.rust-lang.org/1.91.1/std/primitive.i8.html">i8</a>, |
22 | 22 | type_: <a class="struct" href="https://doc.rust-lang.org/1.91.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, |
23 | 23 | error: <a class="primitive" href="https://doc.rust-lang.org/1.91.1/std/primitive.bool.html">bool</a>, |
24 | | - span: <a class="struct" href="../../../leo_span/span/struct.Span.html" title="struct leo_span::span::Span">Span</a>, |
| 24 | + span: Span, |
25 | 25 | backtrace: Backtrace, |
26 | 26 | ) -> Self<div class="where">where |
27 | 27 | S: <a class="trait" href="https://doc.rust-lang.org/1.91.1/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a>,</div></h4></section></summary><div class="docblock"><p>Creates a backtraced error from a span and a backtrace.</p> |
|
0 commit comments