| <!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="API documentation for the Rust `AstIdLoc` trait in crate `hir_def`."><title>AstIdLoc in hir_def - 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="hir_def" 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 trait"><!--[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="#">AstIdLoc</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../hir_def/index.html">hir_def</a><span class="version">0.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">AstId<wbr>Loc</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Ast" title="Ast">Ast</a></li><li><a href="#associatedtype.Container" title="Container">Container</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.ast_id" title="ast_id">ast_id</a></li><li><a href="#tymethod.container" title="container">container</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate hir_<wbr>def</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">hir_def</a></div><h1>Trait <span class="trait">AstId<wbr>Loc</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/hir_def/lib.rs.html#186-191">Source</a> </span></div><pre class="rust item-decl"><code>pub trait AstIdLoc { |
| type <a href="#associatedtype.Container" class="associatedtype">Container</a>; |
| type <a href="#associatedtype.Ast" class="associatedtype">Ast</a>: AstNode; |
| |
| // Required methods |
| fn <a href="#tymethod.ast_id" class="fn">ast_id</a>(&self) -> AstId<Self::<a class="associatedtype" href="trait.AstIdLoc.html#associatedtype.Ast" title="type hir_def::AstIdLoc::Ast">Ast</a>>; |
| <span class="item-spacer"></span> fn <a href="#tymethod.container" class="fn">container</a>(&self) -> Self::<a class="associatedtype" href="trait.AstIdLoc.html#associatedtype.Container" title="type hir_def::AstIdLoc::Container">Container</a>; |
| }</code></pre><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><section id="associatedtype.Container" class="method"><a class="src rightside" href="../src/hir_def/lib.rs.html#187">Source</a><h4 class="code-header">type <a href="#associatedtype.Container" class="associatedtype">Container</a></h4></section><section id="associatedtype.Ast" class="method"><a class="src rightside" href="../src/hir_def/lib.rs.html#188">Source</a><h4 class="code-header">type <a href="#associatedtype.Ast" class="associatedtype">Ast</a>: AstNode</h4></section></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><section id="tymethod.ast_id" class="method"><a class="src rightside" href="../src/hir_def/lib.rs.html#189">Source</a><h4 class="code-header">fn <a href="#tymethod.ast_id" class="fn">ast_id</a>(&self) -> AstId<Self::<a class="associatedtype" href="trait.AstIdLoc.html#associatedtype.Ast" title="type hir_def::AstIdLoc::Ast">Ast</a>></h4></section><section id="tymethod.container" class="method"><a class="src rightside" href="../src/hir_def/lib.rs.html#190">Source</a><h4 class="code-header">fn <a href="#tymethod.container" class="fn">container</a>(&self) -> Self::<a class="associatedtype" href="trait.AstIdLoc.html#associatedtype.Container" title="type hir_def::AstIdLoc::Container">Container</a></h4></section></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-AstIdLoc-for-EnumVariantLoc" class="impl"><a class="src rightside" href="../src/hir_def/lib.rs.html#359">Source</a><a href="#impl-AstIdLoc-for-EnumVariantLoc" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AstIdLoc.html" title="trait hir_def::AstIdLoc">AstIdLoc</a> for <a class="struct" href="struct.EnumVariantLoc.html" title="struct hir_def::EnumVariantLoc">EnumVariantLoc</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Container-1" class="associatedtype trait-impl"><a class="src rightside" href="../src/hir_def/lib.rs.html#359">Source</a><a href="#associatedtype.Container-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Container" class="associatedtype">Container</a> = <a class="struct" href="struct.EnumId.html" title="struct hir_def::EnumId">EnumId</a></h4></section><section id="associatedtype.Ast-1" class="associatedtype trait-impl"><a class="src rightside" href="../src/hir_def/lib.rs.html#359">Source</a><a href="#associatedtype.Ast-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Ast" class="associatedtype">Ast</a> = Variant</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AstIdLoc-for-Macro2Loc" class="impl"><a class="src rightside" href="../src/hir_def/lib.rs.html#383">Source</a><a href="#impl-AstIdLoc-for-Macro2Loc" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AstIdLoc.html" title="trait hir_def::AstIdLoc">AstIdLoc</a> for <a class="struct" href="struct.Macro2Loc.html" title="struct hir_def::Macro2Loc">Macro2Loc</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Container-2" class="associatedtype trait-impl"><a class="src rightside" href="../src/hir_def/lib.rs.html#383">Source</a><a href="#associatedtype.Container-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Container" class="associatedtype">Container</a> = <a class="struct" href="struct.ModuleId.html" title="struct hir_def::ModuleId">ModuleId</a></h4></section><section id="associatedtype.Ast-2" class="associatedtype trait-impl"><a class="src rightside" href="../src/hir_def/lib.rs.html#383">Source</a><a href="#associatedtype.Ast-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Ast" class="associatedtype">Ast</a> = MacroDef</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AstIdLoc-for-MacroRulesLoc" class="impl"><a class="src rightside" href="../src/hir_def/lib.rs.html#394">Source</a><a href="#impl-AstIdLoc-for-MacroRulesLoc" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AstIdLoc.html" title="trait hir_def::AstIdLoc">AstIdLoc</a> for <a class="struct" href="struct.MacroRulesLoc.html" title="struct hir_def::MacroRulesLoc">MacroRulesLoc</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Container-3" class="associatedtype trait-impl"><a class="src rightside" href="../src/hir_def/lib.rs.html#394">Source</a><a href="#associatedtype.Container-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Container" class="associatedtype">Container</a> = <a class="struct" href="struct.ModuleId.html" title="struct hir_def::ModuleId">ModuleId</a></h4></section><section id="associatedtype.Ast-3" class="associatedtype trait-impl"><a class="src rightside" href="../src/hir_def/lib.rs.html#394">Source</a><a href="#associatedtype.Ast-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Ast" class="associatedtype">Ast</a> = MacroRules</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AstIdLoc-for-ProcMacroLoc" class="impl"><a class="src rightside" href="../src/hir_def/lib.rs.html#422">Source</a><a href="#impl-AstIdLoc-for-ProcMacroLoc" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AstIdLoc.html" title="trait hir_def::AstIdLoc">AstIdLoc</a> for <a class="struct" href="struct.ProcMacroLoc.html" title="struct hir_def::ProcMacroLoc">ProcMacroLoc</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Container-4" class="associatedtype trait-impl"><a class="src rightside" href="../src/hir_def/lib.rs.html#422">Source</a><a href="#associatedtype.Container-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Container" class="associatedtype">Container</a> = <a class="struct" href="struct.CrateRootModuleId.html" title="struct hir_def::CrateRootModuleId">CrateRootModuleId</a></h4></section><section id="associatedtype.Ast-4" class="associatedtype trait-impl"><a class="src rightside" href="../src/hir_def/lib.rs.html#422">Source</a><a href="#associatedtype.Ast-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Ast" class="associatedtype">Ast</a> = Fn</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AstIdLoc-for-AssocItemLoc%3CN%3E" class="impl"><a class="src rightside" href="../src/hir_def/lib.rs.html#206-217">Source</a><a href="#impl-AstIdLoc-for-AssocItemLoc%3CN%3E" class="anchor">§</a><h3 class="code-header">impl<N: AstIdNode> <a class="trait" href="trait.AstIdLoc.html" title="trait hir_def::AstIdLoc">AstIdLoc</a> for <a class="struct" href="struct.AssocItemLoc.html" title="struct hir_def::AssocItemLoc">AssocItemLoc</a><N></h3></section></summary><div class="impl-items"><section id="associatedtype.Container-5" class="associatedtype trait-impl"><a class="src rightside" href="../src/hir_def/lib.rs.html#207">Source</a><a href="#associatedtype.Container-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Container" class="associatedtype">Container</a> = <a class="enum" href="enum.ItemContainerId.html" title="enum hir_def::ItemContainerId">ItemContainerId</a></h4></section><section id="associatedtype.Ast-5" class="associatedtype trait-impl"><a class="src rightside" href="../src/hir_def/lib.rs.html#208">Source</a><a href="#associatedtype.Ast-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Ast" class="associatedtype">Ast</a> = N</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-AstIdLoc-for-ItemLoc%3CN%3E" class="impl"><a class="src rightside" href="../src/hir_def/lib.rs.html#193-204">Source</a><a href="#impl-AstIdLoc-for-ItemLoc%3CN%3E" class="anchor">§</a><h3 class="code-header">impl<N: AstIdNode> <a class="trait" href="trait.AstIdLoc.html" title="trait hir_def::AstIdLoc">AstIdLoc</a> for <a class="struct" href="struct.ItemLoc.html" title="struct hir_def::ItemLoc">ItemLoc</a><N></h3></section></summary><div class="impl-items"><section id="associatedtype.Container-6" class="associatedtype trait-impl"><a class="src rightside" href="../src/hir_def/lib.rs.html#194">Source</a><a href="#associatedtype.Container-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Container" class="associatedtype">Container</a> = <a class="struct" href="struct.ModuleId.html" title="struct hir_def::ModuleId">ModuleId</a></h4></section><section id="associatedtype.Ast-6" class="associatedtype trait-impl"><a class="src rightside" href="../src/hir_def/lib.rs.html#195">Source</a><a href="#associatedtype.Ast-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Ast" class="associatedtype">Ast</a> = N</h4></section></div></details></div><script src="../trait.impl/hir_def/trait.AstIdLoc.js" async></script></section></div></main></body></html> |