rust-analyzer/base_db/index.html
2025-12-27 10:35:13 +00:00

14 lines
13 KiB
HTML
Raw Permalink 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="base_db defines basic database traits. The concrete DB is defined by ide."><title>base_db - 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-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="base_db" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0 (ded5c06cf 2025-12-08)" data-channel="1.92.0" data-search-js="search-d69d8955.js" data-stringdex-js="stringdex-c3e638e9.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-ce535bd0.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 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 base_db</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../base_db/index.html">base_db</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="#reexports">Crate Items</a></h3><ul class="block"><li><a href="#reexports" title="Re-exports">Re-exports</a></li><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#macros" title="Macros">Macros</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#functions" title="Functions">Functions</a></li><li><a href="#types" title="Type Aliases">Type Aliases</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>base_db</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/base_db/lib.rs.html#1-442">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>base_db defines basic database traits. The concrete DB is defined by ide.</p>
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><dl class="item-table reexports"><dt id="reexport.salsa"><code>pub use salsa;</code></dt><dt id="reexport.salsa_macros"><code>pub use salsa_macros;</code></dt><dt id="reexport.query_group"><code>pub use <a class="mod" href="../query_group_macro/index.html" title="mod query_group_macro">query_group</a>;</code></dt></dl><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="target/index.html" title="mod base_db::target">target</a></dt><dd>Information about the target.</dd></dl><h2 id="macros" class="section-header">Macros<a href="#macros" class="anchor">§</a></h2><dl class="item-table"><dt><a class="macro" href="macro.impl_intern_key.html" title="macro base_db::impl_intern_key">impl_<wbr>intern_<wbr>key</a></dt></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.AnchoredPath.html" title="struct base_db::AnchoredPath">Anchored<wbr>Path</a></dt><dd>Path relative to a file.</dd><dt><a class="struct" href="struct.AnchoredPathBuf.html" title="struct base_db::AnchoredPathBuf">Anchored<wbr>Path<wbr>Buf</a></dt><dd>Path relative to a file.</dd><dt><a class="struct" href="struct.BuildMetadata.html" title="struct base_db::BuildMetadata">Build<wbr>Metadata</a></dt><dd>Optional build metadata identifier. This comes after <code>+</code> in a SemVer
version, as in <code>0.8.1+zstd.1.5.0</code>.</dd><dt><a class="struct" href="struct.Crate.html" title="struct base_db::Crate">Crate</a></dt><dt><a class="struct" href="struct.CrateBuilder.html" title="struct base_db::CrateBuilder">Crate<wbr>Builder</a></dt><dt><a class="struct" href="struct.CrateDisplayName.html" title="struct base_db::CrateDisplayName">Crate<wbr>Display<wbr>Name</a></dt><dt><a class="struct" href="struct.CrateGraphBuilder.html" title="struct base_db::CrateGraphBuilder">Crate<wbr>Graph<wbr>Builder</a></dt><dt><a class="struct" href="struct.CrateName.html" title="struct base_db::CrateName">Crate<wbr>Name</a></dt><dt><a class="struct" href="struct.CrateWorkspaceData.html" title="struct base_db::CrateWorkspaceData">Crate<wbr>Workspace<wbr>Data</a></dt><dd>Crate related data shared by the whole workspace.</dd><dt><a class="struct" href="struct.CratesMap.html" title="struct base_db::CratesMap">Crates<wbr>Map</a></dt><dd>The mapping from <a href="struct.UniqueCrateData.html" title="struct base_db::UniqueCrateData"><code>UniqueCrateData</code></a> to their <a href="struct.Crate.html" title="struct base_db::Crate"><code>Crate</code></a> input.</dd><dt><a class="struct" href="struct.DbPanicContext.html" title="struct base_db::DbPanicContext">DbPanic<wbr>Context</a></dt><dt><a class="struct" href="struct.EditionedFileId.html" title="struct base_db::EditionedFileId">Editioned<wbr>File<wbr>Id</a></dt><dt><a class="struct" href="struct.Env.html" title="struct base_db::Env">Env</a></dt><dt><a class="struct" href="struct.ExtraCrateData.html" title="struct base_db::ExtraCrateData">Extra<wbr>Crate<wbr>Data</a></dt><dd>Crate data unrelated to analysis.</dd><dt><a class="struct" href="struct.FileChange.html" title="struct base_db::FileChange">File<wbr>Change</a></dt><dd>Encapsulate a bunch of raw <code>.set</code> calls on the database.</dd><dt><a class="struct" href="struct.FileId.html" title="struct base_db::FileId">FileId</a></dt><dd>Handle to a file in [<code>Vfs</code>]</dd><dt><a class="struct" href="struct.FileSet.html" title="struct base_db::FileSet">FileSet</a></dt><dd>A set of <a href="struct.VfsPath.html" title="struct base_db::VfsPath"><code>VfsPath</code></a>s identified by <a href="struct.FileId.html" title="struct base_db::FileId"><code>FileId</code></a>s.</dd><dt><a class="struct" href="struct.FileSourceRootInput.html" title="struct base_db::FileSourceRootInput">File<wbr>Source<wbr>Root<wbr>Input</a></dt><dt><a class="struct" href="struct.FileText.html" title="struct base_db::FileText">File<wbr>Text</a></dt><dt><a class="struct" href="struct.Files.html" title="struct base_db::Files">Files</a></dt><dt><a class="struct" href="struct.LibraryRoots.html" title="struct base_db::LibraryRoots">Library<wbr>Roots</a></dt><dd>The set of roots for crates.io libraries.
Files in libraries are assumed to never change.</dd><dt><a class="struct" href="struct.LocalRoots.html" title="struct base_db::LocalRoots">Local<wbr>Roots</a></dt><dd>The set of “local” (that is, from the current workspace) roots.
Files in local roots are assumed to change frequently.</dd><dt><a class="struct" href="struct.Nonce.html" title="struct base_db::Nonce">Nonce</a></dt><dt><a class="struct" href="struct.Prerelease.html" title="struct base_db::Prerelease">Prerelease</a></dt><dd>Optional pre-release identifier on a version string. This comes after <code>-</code> in
a SemVer version, like <code>1.0.0-alpha.1</code></dd><dt><a class="struct" href="struct.SourceRoot.html" title="struct base_db::SourceRoot">Source<wbr>Root</a></dt><dd>Files are grouped into source roots. A source root is a directory on the
file systems which is watched for changes. Typically it corresponds to a
Rust crate. Source roots <em>might</em> be nested: in this case, a file belongs to
the nearest enclosing source root. Paths to files are always relative to a
source root, and the analyzer does not know the root path of the source root at
all. So, a file from one source root cant refer to a file in another source
root by path.</dd><dt><a class="struct" href="struct.SourceRootId.html" title="struct base_db::SourceRootId">Source<wbr>Root<wbr>Id</a></dt><dt><a class="struct" href="struct.SourceRootInput.html" title="struct base_db::SourceRootInput">Source<wbr>Root<wbr>Input</a></dt><dt><a class="struct" href="struct.UniqueCrateData.html" title="struct base_db::UniqueCrateData">Unique<wbr>Crate<wbr>Data</a></dt><dd>The crate data from which we derive the <code>Crate</code>.</dd><dt><a class="struct" href="struct.Version.html" title="struct base_db::Version">Version</a></dt><dd><strong>SemVer version</strong> as defined by <a href="https://semver.org">https://semver.org</a>.</dd><dt><a class="struct" href="struct.VersionReq.html" title="struct base_db::VersionReq">Version<wbr>Req</a></dt><dd><strong>SemVer version requirement</strong> describing the intersection of some version
comparators, such as <code>&gt;=1.2.3, &lt;1.8</code>.</dd><dt><a class="struct" href="struct.VfsPath.html" title="struct base_db::VfsPath">VfsPath</a></dt><dd>Path in <a href="crate::Vfs"><code>Vfs</code></a>.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.CrateOrigin.html" title="enum base_db::CrateOrigin">Crate<wbr>Origin</a></dt><dd>Origin of the crates.</dd><dt><a class="enum" href="enum.LangCrateOrigin.html" title="enum base_db::LangCrateOrigin">Lang<wbr>Crate<wbr>Origin</a></dt><dt><a class="enum" href="enum.ProcMacroLoadingError.html" title="enum base_db::ProcMacroLoadingError">Proc<wbr>Macro<wbr>Loading<wbr>Error</a></dt><dt><a class="enum" href="enum.ReleaseChannel.html" title="enum base_db::ReleaseChannel">Release<wbr>Channel</a></dt></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.DEFAULT_BORROWCK_LRU_CAP.html" title="constant base_db::DEFAULT_BORROWCK_LRU_CAP">DEFAULT_<wbr>BORROWCK_<wbr>LRU_<wbr>CAP</a></dt><dt><a class="constant" href="constant.DEFAULT_FILE_TEXT_LRU_CAP.html" title="constant base_db::DEFAULT_FILE_TEXT_LRU_CAP">DEFAULT_<wbr>FILE_<wbr>TEXT_<wbr>LRU_<wbr>CAP</a></dt><dt><a class="constant" href="constant.DEFAULT_PARSE_LRU_CAP.html" title="constant base_db::DEFAULT_PARSE_LRU_CAP">DEFAULT_<wbr>PARSE_<wbr>LRU_<wbr>CAP</a></dt></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.RootQueryDb.html" title="trait base_db::RootQueryDb">Root<wbr>Query<wbr>Db</a></dt><dd>Database which stores all significant input facts: source code and project
model. Everything else in rust-analyzer is derived from these queries.</dd><dt><a class="trait" href="trait.SourceDatabase.html" title="trait base_db::SourceDatabase">Source<wbr>Database</a></dt></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.unsafe_update_eq.html" title="fn base_db::unsafe_update_eq">unsafe_<wbr>update_<wbr>eq</a><sup title="unsafe function"></sup></dt><dd>SAFETY</dd></dl><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><dl class="item-table"><dt><a class="type" href="type.BuiltCrateData.html" title="type base_db::BuiltCrateData">Built<wbr>Crate<wbr>Data</a></dt><dt><a class="type" href="type.BuiltDependency.html" title="type base_db::BuiltDependency">Built<wbr>Dependency</a></dt><dt><a class="type" href="type.CrateBuilderId.html" title="type base_db::CrateBuilderId">Crate<wbr>Builder<wbr>Id</a></dt><dt><a class="type" href="type.CrateDataBuilder.html" title="type base_db::CrateDataBuilder">Crate<wbr>Data<wbr>Builder</a></dt><dt><a class="type" href="type.CratesIdMap.html" title="type base_db::CratesIdMap">Crates<wbr>IdMap</a></dt><dt><a class="type" href="type.DependencyBuilder.html" title="type base_db::DependencyBuilder">Dependency<wbr>Builder</a></dt><dt><a class="type" href="type.FxIndexMap.html" title="type base_db::FxIndexMap">FxIndex<wbr>Map</a></dt><dt><a class="type" href="type.FxIndexSet.html" title="type base_db::FxIndexSet">FxIndex<wbr>Set</a></dt><dt><a class="type" href="type.ProcMacroPaths.html" title="type base_db::ProcMacroPaths">Proc<wbr>Macro<wbr>Paths</a></dt></dl></section></div></main></body></html>