Files
rust-analyzer/rust_analyzer/index.html
github-merge-queue[bot] 7cf2001b4e deploy: fad5c3d2d6
2026-03-06 18:57:12 +00:00

17 lines
11 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="Implementation of the LSP for rust-analyzer."><title>rust_analyzer - 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-77263533.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="rust_analyzer" data-themes="" data-resource-suffix="" data-rustdoc-version="1.94.0 (4a4ef493e 2026-03-02)" data-channel="1.94.0" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-b897f86f.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-7bab91a1.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-ffcac47a.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 mod crate"><!--[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="#">Crate rust_analyzer</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../rust_analyzer/index.html">rust_<wbr>analyzer</a><span class="version">0.0.0</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#modules">Crate Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"></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"><h1>Crate <span>rust_<wbr>analyzer</span>&nbsp;<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/rust_analyzer/lib.rs.html#1-99">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Implementation of the LSP for rust-analyzer.</p>
<p>This crate takes Rust-specific analysis results from ide and translates
into LSP types.</p>
<p>It also is the root of all state. <code>world</code> module defines the bulk of the
state, and <code>main_loop</code> module defines the rules for modifying it.</p>
<p>The <code>cli</code> submodule implements some batch-processing analysis, primarily as
a debugging aid.</p>
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="cli/index.html" title="mod rust_analyzer::cli">cli</a></dt><dd>Various batch processing tasks, intended primarily for debugging.</dd><dt><a class="mod" href="command/index.html" title="mod rust_analyzer::command">command</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Utilities for running a cargo command like <code>cargo check</code> or <code>cargo test</code> in a separate thread
and parse its stdout/stderr.</dd><dt><a class="mod" href="config/index.html" title="mod rust_analyzer::config">config</a></dt><dd>Config used by the language server.</dd><dt><a class="mod" href="diagnostics/index.html" title="mod rust_analyzer::diagnostics">diagnostics</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Book keeping for keeping diagnostics easily in sync with the client.</dd><dt><a class="mod" href="discover/index.html" title="mod rust_analyzer::discover">discover</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Infrastructure for lazy project discovery. Currently only support rust-project.json discovery
via a custom discover command.</dd><dt><a class="mod" href="flycheck/index.html" title="mod rust_analyzer::flycheck">flycheck</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Flycheck provides the functionality needed to run <code>cargo check</code> to provide
LSP diagnostics based on the output of the command.</dd><dt><a class="mod" href="global_state/index.html" title="mod rust_analyzer::global_state">global_<wbr>state</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>The context or environment in which the language server functions. In our
server implementation this is know as the <code>WorldState</code>.</dd><dt><a class="mod" href="handlers/index.html" title="mod rust_analyzer::handlers">handlers</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dt><a class="mod" href="line_index/index.html" title="mod rust_analyzer::line_index">line_<wbr>index</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Enhances <code>ide::LineIndex</code> with additional info required to convert offsets
into lsp positions.</dd><dt><a class="mod" href="lsp/index.html" title="mod rust_analyzer::lsp">lsp</a></dt><dd>Custom LSP definitions and protocol conversions.</dd><dt><a class="mod" href="main_loop/index.html" title="mod rust_analyzer::main_loop">main_<wbr>loop</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>The main loop of <code>rust-analyzer</code> responsible for dispatching LSP
requests/replies and notifications back to the client.</dd><dt><a class="mod" href="mem_docs/index.html" title="mod rust_analyzer::mem_docs">mem_<wbr>docs</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>In-memory document information.</dd><dt><a class="mod" href="op_queue/index.html" title="mod rust_analyzer::op_queue">op_<wbr>queue</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Bookkeeping to make sure only one long-running operation is being executed
at a time.</dd><dt><a class="mod" href="reload/index.html" title="mod rust_analyzer::reload">reload</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Project loading &amp; configuration updates.</dd><dt><a class="mod" href="target_spec/index.html" title="mod rust_analyzer::target_spec">target_<wbr>spec</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>See <code>TargetSpec</code></dd><dt><a class="mod" href="task_pool/index.html" title="mod rust_analyzer::task_pool">task_<wbr>pool</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>A thin wrapper around [<code>stdx::thread::Pool</code>] which threads a sender through spawned jobs.
It is used in <a href="global_state/struct.GlobalState.html" title="struct rust_analyzer::global_state::GlobalState"><code>crate::global_state::GlobalState</code></a> throughout the main loop.</dd><dt><a class="mod" href="test_runner/index.html" title="mod rust_analyzer::test_runner">test_<wbr>runner</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>This module provides the functionality needed to run <code>cargo test</code> in a background
thread and report the result of each test in a channel.</dd><dt><a class="mod" href="tracing/index.html" title="mod rust_analyzer::tracing">tracing</a></dt><dt><a class="mod" href="version/index.html" title="mod rust_analyzer::version">version</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Code for representing rust-analyzers release version number.</dd></dl><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><dl class="item-table"><dt><a class="constant" href="constant.MINIMUM_SUPPORTED_TOOLCHAIN_VERSION.html" title="constant rust_analyzer::MINIMUM_SUPPORTED_TOOLCHAIN_VERSION">MINIMUM_<wbr>SUPPORTED_<wbr>TOOLCHAIN_<wbr>VERSION</a></dt><dd>Any toolchain less than this version will likely not work with rust-analyzer built from this revision.</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.from_json.html" title="fn rust_analyzer::from_json">from_<wbr>json</a></dt><dt><a class="fn" href="fn.main_loop.html" title="fn rust_analyzer::main_loop">main_<wbr>loop</a></dt><dt><a class="fn" href="fn.server_capabilities.html" title="fn rust_analyzer::server_capabilities">server_<wbr>capabilities</a></dt><dt><a class="fn" href="fn.version.html" title="fn rust_analyzer::version">version</a></dt><dd>Returns information about cargos version.</dd><dt><a class="fn" href="fn.ws_to_crate_graph.html" title="fn rust_analyzer::ws_to_crate_graph">ws_<wbr>to_<wbr>crate_<wbr>graph</a></dt></dl><script type="text/json" id="notable-traits-data">{"&[u8]":"<h3>Notable traits for <code>&amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.94.0/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.94.0/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.94.0/std/primitive.u8.html\">u8</a>]</div>","&mut Vec<u8>":"<h3>Notable traits for <code><a class=\"struct\" href=\"https://doc.rust-lang.org/1.94.0/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.94.0/std/primitive.u8.html\">u8</a>, A&gt;</code></h3><pre><code><div class=\"where\">impl&lt;A&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.94.0/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for <a class=\"struct\" href=\"https://doc.rust-lang.org/1.94.0/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.94.0/std/primitive.u8.html\">u8</a>, A&gt;<div class=\"where\">where\n A: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.94.0/core/alloc/trait.Allocator.html\" title=\"trait core::alloc::Allocator\">Allocator</a>,</div></div>","Vec<u8>":"<h3>Notable traits for <code><a class=\"struct\" href=\"https://doc.rust-lang.org/1.94.0/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.94.0/std/primitive.u8.html\">u8</a>, A&gt;</code></h3><pre><code><div class=\"where\">impl&lt;A&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.94.0/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for <a class=\"struct\" href=\"https://doc.rust-lang.org/1.94.0/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.94.0/std/primitive.u8.html\">u8</a>, A&gt;<div class=\"where\">where\n A: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.94.0/core/alloc/trait.Allocator.html\" title=\"trait core::alloc::Allocator\">Allocator</a>,</div></div>"}</script></section></div></main></body></html>