rust-analyzer/hir/trait.MacroFileIdExt.html
github-merge-queue[bot] cddc2a952f deploy: 9923b0085c
2025-01-11 06:35:13 +00:00

27 lines
No EOL
15 KiB
HTML

<!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 `MacroFileIdExt` trait in crate `hir`."><title>MacroFileIdExt in hir - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="hir" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../hir/index.html">hir</a><span class="version">0.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Macro<wbr>File<wbr>IdExt</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.call_node" title="call_node">call_node</a></li><li><a href="#tymethod.eager_arg" title="eager_arg">eager_arg</a></li><li><a href="#tymethod.expansion_info" title="expansion_info">expansion_info</a></li><li><a href="#tymethod.expansion_level" title="expansion_level">expansion_level</a></li><li><a href="#tymethod.is_attr_macro" title="is_attr_macro">is_attr_macro</a></li><li><a href="#tymethod.is_builtin_derive" title="is_builtin_derive">is_builtin_derive</a></li><li><a href="#tymethod.is_custom_derive" title="is_custom_derive">is_custom_derive</a></li><li><a href="#tymethod.is_derive_attr_pseudo_expansion" title="is_derive_attr_pseudo_expansion">is_derive_attr_pseudo_expansion</a></li><li><a href="#tymethod.is_eager" title="is_eager">is_eager</a></li><li><a href="#tymethod.is_env_or_option_env" title="is_env_or_option_env">is_env_or_option_env</a></li><li><a href="#tymethod.is_include_like_macro" title="is_include_like_macro">is_include_like_macro</a></li><li><a href="#tymethod.is_include_macro" title="is_include_macro">is_include_macro</a></li><li><a href="#tymethod.parent" title="parent">parent</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</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">hir</a></span><h1>Trait <span class="trait">MacroFileIdExt</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub trait MacroFileIdExt {
<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 13 methods</span></summary> // Required methods
fn <a href="#tymethod.is_env_or_option_env" class="fn">is_env_or_option_env</a>(&amp;self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.is_include_like_macro" class="fn">is_include_like_macro</a>(&amp;self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.eager_arg" class="fn">eager_arg</a>(&amp;self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;MacroCallId&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.expansion_level" class="fn">expansion_level</a>(self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.call_node" class="fn">call_node</a>(
self,
db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>,
) -&gt; <a class="struct" href="struct.InFileWrapper.html" title="struct hir::InFileWrapper">InFileWrapper</a>&lt;<a class="struct" href="struct.HirFileId.html" title="struct hir::HirFileId">HirFileId</a>, SyntaxNode&lt;RustLanguage&gt;&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.parent" class="fn">parent</a>(self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="struct" href="struct.HirFileId.html" title="struct hir::HirFileId">HirFileId</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.expansion_info" class="fn">expansion_info</a>(self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; ExpansionInfo;
<span class="item-spacer"></span> fn <a href="#tymethod.is_builtin_derive" class="fn">is_builtin_derive</a>(&amp;self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.is_custom_derive" class="fn">is_custom_derive</a>(&amp;self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.is_include_macro" class="fn">is_include_macro</a>(&amp;self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.is_eager" class="fn">is_eager</a>(&amp;self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.is_attr_macro" class="fn">is_attr_macro</a>(&amp;self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.is_derive_attr_pseudo_expansion" class="fn">is_derive_attr_pseudo_expansion</a>(&amp;self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>;
</details>}</code></pre><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><section id="tymethod.is_env_or_option_env" class="method"><h4 class="code-header">fn <a href="#tymethod.is_env_or_option_env" class="fn">is_env_or_option_env</a>(&amp;self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section><section id="tymethod.is_include_like_macro" class="method"><h4 class="code-header">fn <a href="#tymethod.is_include_like_macro" class="fn">is_include_like_macro</a>(&amp;self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section><section id="tymethod.eager_arg" class="method"><h4 class="code-header">fn <a href="#tymethod.eager_arg" class="fn">eager_arg</a>(&amp;self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;MacroCallId&gt;</h4></section><section id="tymethod.expansion_level" class="method"><h4 class="code-header">fn <a href="#tymethod.expansion_level" class="fn">expansion_level</a>(self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a></h4></section><details class="toggle method-toggle" open><summary><section id="tymethod.call_node" class="method"><h4 class="code-header">fn <a href="#tymethod.call_node" class="fn">call_node</a>(
self,
db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>,
) -&gt; <a class="struct" href="struct.InFileWrapper.html" title="struct hir::InFileWrapper">InFileWrapper</a>&lt;<a class="struct" href="struct.HirFileId.html" title="struct hir::HirFileId">HirFileId</a>, SyntaxNode&lt;RustLanguage&gt;&gt;</h4></section></summary><div class="docblock"><p>If this is a macro call, returns the syntax node of the call.</p>
</div></details><section id="tymethod.parent" class="method"><h4 class="code-header">fn <a href="#tymethod.parent" class="fn">parent</a>(self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="struct" href="struct.HirFileId.html" title="struct hir::HirFileId">HirFileId</a></h4></section><section id="tymethod.expansion_info" class="method"><h4 class="code-header">fn <a href="#tymethod.expansion_info" class="fn">expansion_info</a>(self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; ExpansionInfo</h4></section><section id="tymethod.is_builtin_derive" class="method"><h4 class="code-header">fn <a href="#tymethod.is_builtin_derive" class="fn">is_builtin_derive</a>(&amp;self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section><section id="tymethod.is_custom_derive" class="method"><h4 class="code-header">fn <a href="#tymethod.is_custom_derive" class="fn">is_custom_derive</a>(&amp;self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section><details class="toggle method-toggle" open><summary><section id="tymethod.is_include_macro" class="method"><h4 class="code-header">fn <a href="#tymethod.is_include_macro" class="fn">is_include_macro</a>(&amp;self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Return whether this file is an include macro</p>
</div></details><section id="tymethod.is_eager" class="method"><h4 class="code-header">fn <a href="#tymethod.is_eager" class="fn">is_eager</a>(&amp;self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section><details class="toggle method-toggle" open><summary><section id="tymethod.is_attr_macro" class="method"><h4 class="code-header">fn <a href="#tymethod.is_attr_macro" class="fn">is_attr_macro</a>(&amp;self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Return whether this file is an attr macro</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.is_derive_attr_pseudo_expansion" class="method"><h4 class="code-header">fn <a href="#tymethod.is_derive_attr_pseudo_expansion" class="fn">is_derive_attr_pseudo_expansion</a>(&amp;self, db: &amp;dyn <a class="trait" href="db/trait.ExpandDatabase.html" title="trait hir::db::ExpandDatabase">ExpandDatabase</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Return whether this file is the pseudo expansion of the derive attribute.
See [<code>crate::builtin_attr_macro::derive_attr_expand</code>].</p>
</div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-MacroFileIdExt-for-MacroFileId" class="impl"><a href="#impl-MacroFileIdExt-for-MacroFileId" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.MacroFileIdExt.html" title="trait hir::MacroFileIdExt">MacroFileIdExt</a> for <a class="struct" href="struct.MacroFileId.html" title="struct hir::MacroFileId">MacroFileId</a></h3></section></div><script src="../trait.impl/hir_expand/trait.MacroFileIdExt.js" data-ignore-extern-crates="span" async></script></section></div></main></body></html>