mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-26 03:45:04 +00:00
190 lines
90 KiB
HTML
190 lines
90 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 `SemanticsImpl` struct in crate `hir`."><title>SemanticsImpl 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 struct"><!--[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="#">Semantics<wbr>Impl</a></h2><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield.db" title="db">db</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.ancestors_at_offset_with_macros" title="ancestors_at_offset_with_macros">ancestors_at_offset_with_macros</a></li><li><a href="#method.ancestors_with_macros" title="ancestors_with_macros">ancestors_with_macros</a></li><li><a href="#method.as_format_args_parts" title="as_format_args_parts">as_format_args_parts</a></li><li><a href="#method.assert_contains_node" title="assert_contains_node">assert_contains_node</a></li><li><a href="#method.attach_first_edition" title="attach_first_edition">attach_first_edition</a></li><li><a href="#method.binding_mode_of_pat" title="binding_mode_of_pat">binding_mode_of_pat</a></li><li><a href="#method.check_cfg_attr" title="check_cfg_attr">check_cfg_attr</a></li><li><a href="#method.check_for_format_args_template" title="check_for_format_args_template">check_for_format_args_template</a></li><li><a href="#method.derive_helper" title="derive_helper">derive_helper</a></li><li><a href="#method.derive_helpers_in_scope" title="derive_helpers_in_scope">derive_helpers_in_scope</a></li><li><a href="#method.descend_into_macros" title="descend_into_macros">descend_into_macros</a></li><li><a href="#method.descend_into_macros_breakable" title="descend_into_macros_breakable">descend_into_macros_breakable</a></li><li><a href="#method.descend_into_macros_cb" title="descend_into_macros_cb">descend_into_macros_cb</a></li><li><a href="#method.descend_into_macros_exact" title="descend_into_macros_exact">descend_into_macros_exact</a></li><li><a href="#method.descend_into_macros_no_opaque" title="descend_into_macros_no_opaque">descend_into_macros_no_opaque</a></li><li><a href="#method.descend_into_macros_single_exact" title="descend_into_macros_single_exact">descend_into_macros_single_exact</a></li><li><a href="#method.descend_node_
|
|||
|
pub db: &'db dyn <a class="trait" href="db/trait.HirDatabase.html" title="trait hir::db::HirDatabase">HirDatabase</a>,
|
|||
|
<span class="comment">/* private fields */</span>
|
|||
|
}</code></pre><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.db" class="structfield section-header"><a href="#structfield.db" class="anchor field">§</a><code>db: &'db dyn <a class="trait" href="db/trait.HirDatabase.html" title="trait hir::db::HirDatabase">HirDatabase</a></code></span><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-SemanticsImpl%3C'db%3E" class="impl"><a class="src rightside" href="../src/hir/semantics.rs.html#303-1919">Source</a><a href="#impl-SemanticsImpl%3C'db%3E" class="anchor">§</a><h3 class="code-header">impl<'db> <a class="struct" href="struct.SemanticsImpl.html" title="struct hir::SemanticsImpl">SemanticsImpl</a><'db></h3></section></summary><div class="impl-items"><section id="method.parse" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#308-312">Source</a><h4 class="code-header">pub fn <a href="#method.parse" class="fn">parse</a>(&self, file_id: EditionedFileId) -> SourceFile</h4></section><section id="method.attach_first_edition" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#314-319">Source</a><h4 class="code-header">pub fn <a href="#method.attach_first_edition" class="fn">attach_first_edition</a>(&self, file: FileId) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><EditionedFileId></h4></section><section id="method.parse_guess_edition" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#321-328">Source</a><h4 class="code-header">pub fn <a href="#method.parse_guess_edition" class="fn">parse_guess_edition</a>(&self, file_id: FileId) -> SourceFile</h4></section><section id="method.find_parent_file" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#330-358">Source</a><h4 class="code-header">pub fn <a href="#method.find_parent_file" class="fn">find_parent_file</a>(&self, file_id: <a class="struct" href="struct.HirFileId.html" title="struct hir::HirFileId">HirFileId</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="type" href="type.InFile.html" title="type hir::InFile">InFile</a><SyntaxNode>></h4></section><details class="toggle method-toggle" open><summary><section id="method.module_definition_node" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#362-369">Source</a><h4 class="code-header">pub fn <a href="#method.module_definition_node" class="fn">module_definition_node</a>(&self, module: <a class="struct" href="struct.Module.html" title="struct hir::Module">Module</a>) -> <a class="type" href="type.InFile.html" title="type hir::InFile">InFile</a><SyntaxNode></h4></section></summary><div class="docblock"><p>Returns the <code>SyntaxNode</code> of the module. If this is a file module, returns
|
|||
|
the <code>SyntaxNode</code> of the <em>definition</em> file, not of the <em>declaration</em>.</p>
|
|||
|
</div></details><section id="method.parse_or_expand" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#371-375">Source</a><h4 class="code-header">pub fn <a href="#method.parse_or_expand" class="fn">parse_or_expand</a>(&self, file_id: <a class="struct" href="struct.HirFileId.html" title="struct hir::HirFileId">HirFileId</a>) -> SyntaxNode</h4></section><section id="method.expand" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#377-381">Source</a><h4 class="code-header">pub fn <a href="#method.expand" class="fn">expand</a>(&self, file_id: <a class="struct" href="struct.MacroFileId.html" title="struct hir::MacroFileId">MacroFileId</a>) -> <a class="type" href="type.ExpandResult.html" title="type hir::ExpandResult">ExpandResult</a><SyntaxNode></h4></section><section id="method.expand_macro_call" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#383-397">Source</a><h4 class="code-header">pub fn <a href="#method.expand_macro_call" class="fn">expand_macro_call</a>(&self, macro_call: &MacroCall) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><SyntaxNode></h4></section><section id="method.check_cfg_attr" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#399-410">Source</a><h4 class="code-header">pub fn <a href="#method.check_cfg_attr" class="fn">check_cfg_attr</a>(&self, attr: &TokenTree) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<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="method.expand_allowed_builtins" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#414-455">Source</a><h4 class="code-header">pub fn <a href="#method.expand_allowed_builtins" class="fn">expand_allowed_builtins</a>(
|
|||
|
&self,
|
|||
|
macro_call: &MacroCall,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="type" href="type.ExpandResult.html" title="type hir::ExpandResult">ExpandResult</a><SyntaxNode>></h4></section></summary><div class="docblock"><p>Expands the macro if it isn’t one of the built-in ones that expand to custom syntax or dummy
|
|||
|
expansions.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.expand_attr_macro" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#458-462">Source</a><h4 class="code-header">pub fn <a href="#method.expand_attr_macro" class="fn">expand_attr_macro</a>(&self, item: &Item) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="type" href="type.ExpandResult.html" title="type hir::ExpandResult">ExpandResult</a><SyntaxNode>></h4></section></summary><div class="docblock"><p>If <code>item</code> has an attribute macro attached to it, expands it.</p>
|
|||
|
</div></details><section id="method.expand_derive_as_pseudo_attr_macro" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#464-471">Source</a><h4 class="code-header">pub fn <a href="#method.expand_derive_as_pseudo_attr_macro" class="fn">expand_derive_as_pseudo_attr_macro</a>(
|
|||
|
&self,
|
|||
|
attr: &Attr,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><SyntaxNode></h4></section><section id="method.resolve_derive_macro" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#473-483">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_derive_macro" class="fn">resolve_derive_macro</a>(&self, attr: &Attr) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Macro.html" title="struct hir::Macro">Macro</a>>>></h4></section><section id="method.expand_derive_macro" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#485-498">Source</a><h4 class="code-header">pub fn <a href="#method.expand_derive_macro" class="fn">expand_derive_macro</a>(
|
|||
|
&self,
|
|||
|
attr: &Attr,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="type" href="type.ExpandResult.html" title="type hir::ExpandResult">ExpandResult</a><SyntaxNode>>></h4></section><section id="method.is_derive_annotated" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#511-515">Source</a><h4 class="code-header">pub fn <a href="#method.is_derive_annotated" class="fn">is_derive_annotated</a>(&self, adt: &Adt) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section><section id="method.derive_helpers_in_scope" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#517-531">Source</a><h4 class="code-header">pub fn <a href="#method.derive_helpers_in_scope" class="fn">derive_helpers_in_scope</a>(
|
|||
|
&self,
|
|||
|
adt: &Adt,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><(<a class="struct" href="struct.Symbol.html" title="struct hir::Symbol">Symbol</a>, <a class="struct" href="struct.Symbol.html" title="struct hir::Symbol">Symbol</a>)>></h4></section><section id="method.derive_helper" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#533-552">Source</a><h4 class="code-header">pub fn <a href="#method.derive_helper" class="fn">derive_helper</a>(&self, attr: &Attr) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><(<a class="struct" href="struct.Macro.html" title="struct hir::Macro">Macro</a>, <a class="struct" href="struct.MacroFileId.html" title="struct hir::MacroFileId">MacroFileId</a>)>></h4></section><section id="method.is_attr_macro_call" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#554-558">Source</a><h4 class="code-header">pub fn <a href="#method.is_attr_macro_call" class="fn">is_attr_macro_call</a>(&self, item: &Item) -> <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="method.speculative_expand_macro_call" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#562-581">Source</a><h4 class="code-header">pub fn <a href="#method.speculative_expand_macro_call" class="fn">speculative_expand_macro_call</a>(
|
|||
|
&self,
|
|||
|
actual_macro_call: &MacroCall,
|
|||
|
speculative_args: &TokenTree,
|
|||
|
token_to_map: SyntaxToken,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(SyntaxNode, <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><(SyntaxToken, <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>)>)></h4></section></summary><div class="docblock"><p>Expand the macro call with a different token tree, mapping the <code>token_to_map</code> down into the
|
|||
|
expansion. <code>token_to_map</code> should be a token from the <code>speculative args</code> node.</p>
|
|||
|
</div></details><section id="method.speculative_expand_raw" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#583-595">Source</a><h4 class="code-header">pub fn <a href="#method.speculative_expand_raw" class="fn">speculative_expand_raw</a>(
|
|||
|
&self,
|
|||
|
macro_file: <a class="struct" href="struct.MacroFileId.html" title="struct hir::MacroFileId">MacroFileId</a>,
|
|||
|
speculative_args: &SyntaxNode,
|
|||
|
token_to_map: SyntaxToken,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(SyntaxNode, <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><(SyntaxToken, <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>)>)></h4></section><details class="toggle method-toggle" open><summary><section id="method.speculative_expand_attr_macro" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#599-613">Source</a><h4 class="code-header">pub fn <a href="#method.speculative_expand_attr_macro" class="fn">speculative_expand_attr_macro</a>(
|
|||
|
&self,
|
|||
|
actual_macro_call: &Item,
|
|||
|
speculative_args: &Item,
|
|||
|
token_to_map: SyntaxToken,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(SyntaxNode, <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><(SyntaxToken, <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>)>)></h4></section></summary><div class="docblock"><p>Expand the macro call with a different item as the input, mapping the <code>token_to_map</code> down into the
|
|||
|
expansion. <code>token_to_map</code> should be a token from the <code>speculative args</code> node.</p>
|
|||
|
</div></details><section id="method.speculative_expand_derive_as_pseudo_attr_macro" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#615-632">Source</a><h4 class="code-header">pub fn <a href="#method.speculative_expand_derive_as_pseudo_attr_macro" class="fn">speculative_expand_derive_as_pseudo_attr_macro</a>(
|
|||
|
&self,
|
|||
|
actual_macro_call: &Attr,
|
|||
|
speculative_args: &Attr,
|
|||
|
token_to_map: SyntaxToken,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(SyntaxNode, <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><(SyntaxToken, <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>)>)></h4></section><details class="toggle method-toggle" open><summary><section id="method.as_format_args_parts" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#635-677">Source</a><h4 class="code-header">pub fn <a href="#method.as_format_args_parts" class="fn">as_format_args_parts</a>(
|
|||
|
&self,
|
|||
|
string: &String,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><(TextRange, <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either">Either</a><<a class="enum" href="enum.PathResolution.html" title="enum hir::PathResolution">PathResolution</a>, <a class="struct" href="struct.InlineAsmOperand.html" title="struct hir::InlineAsmOperand">InlineAsmOperand</a>>>)>></h4></section></summary><div class="docblock"><p>Retrieves all the formatting parts of the format_args! (or <code>asm!</code>) template string.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.check_for_format_args_template" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#680-698">Source</a><h4 class="code-header">pub fn <a href="#method.check_for_format_args_template" class="fn">check_for_format_args_template</a>(
|
|||
|
&self,
|
|||
|
original_token: SyntaxToken,
|
|||
|
offset: TextSize,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(TextRange, <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either">Either</a><<a class="enum" href="enum.PathResolution.html" title="enum hir::PathResolution">PathResolution</a>, <a class="struct" href="struct.InlineAsmOperand.html" title="struct hir::InlineAsmOperand">InlineAsmOperand</a>>>)></h4></section></summary><div class="docblock"><p>Retrieves the formatting part of the format_args! template string at the given offset.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.descend_node_into_attributes" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#728-793">Source</a><h4 class="code-header">pub fn <a href="#method.descend_node_into_attributes" class="fn">descend_node_into_attributes</a><N: AstNode>(
|
|||
|
&self,
|
|||
|
node: N,
|
|||
|
) -> SmallVec<<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">[N; 1]</a>></h4></section></summary><div class="docblock"><p>Maps a node down by mapping its first and last token down.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.might_be_inside_macro_call" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#797-840">Source</a><h4 class="code-header">pub fn <a href="#method.might_be_inside_macro_call" class="fn">might_be_inside_macro_call</a>(&self, token: &SyntaxToken) -> <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>Does a syntactic traversal to check whether this token might be inside a macro call</p>
|
|||
|
</div></details><section id="method.descend_into_macros_cb" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#842-853">Source</a><h4 class="code-header">pub fn <a href="#method.descend_into_macros_cb" class="fn">descend_into_macros_cb</a>(
|
|||
|
&self,
|
|||
|
token: SyntaxToken,
|
|||
|
cb: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="type" href="type.InFile.html" title="type hir::InFile">InFile</a><SyntaxToken>, SyntaxContextId),
|
|||
|
)</h4></section><section id="method.descend_into_macros" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#855-867">Source</a><h4 class="code-header">pub fn <a href="#method.descend_into_macros" class="fn">descend_into_macros</a>(
|
|||
|
&self,
|
|||
|
token: SyntaxToken,
|
|||
|
) -> SmallVec<[SyntaxToken; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">1</a>]></h4></section><section id="method.descend_into_macros_no_opaque" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#869-884">Source</a><h4 class="code-header">pub fn <a href="#method.descend_into_macros_no_opaque" class="fn">descend_into_macros_no_opaque</a>(
|
|||
|
&self,
|
|||
|
token: SyntaxToken,
|
|||
|
) -> SmallVec<[SyntaxToken; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">1</a>]></h4></section><section id="method.descend_into_macros_breakable" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#886-892">Source</a><h4 class="code-header">pub fn <a href="#method.descend_into_macros_breakable" class="fn">descend_into_macros_breakable</a><T>(
|
|||
|
&self,
|
|||
|
token: <a class="type" href="type.InRealFile.html" title="type hir::InRealFile">InRealFile</a><SyntaxToken>,
|
|||
|
cb: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="type" href="type.InFile.html" title="type hir::InFile">InFile</a><SyntaxToken>, SyntaxContextId) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><T>,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><T></h4></section><details class="toggle method-toggle" open><summary><section id="method.descend_into_macros_exact" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#896-915">Source</a><h4 class="code-header">pub fn <a href="#method.descend_into_macros_exact" class="fn">descend_into_macros_exact</a>(
|
|||
|
&self,
|
|||
|
token: SyntaxToken,
|
|||
|
) -> SmallVec<[SyntaxToken; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">1</a>]></h4></section></summary><div class="docblock"><p>Descends the token into expansions, returning the tokens that matches the input
|
|||
|
token’s [<code>SyntaxKind</code>] and text.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.descend_into_macros_single_exact" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#919-942">Source</a><h4 class="code-header">pub fn <a href="#method.descend_into_macros_single_exact" class="fn">descend_into_macros_single_exact</a>(
|
|||
|
&self,
|
|||
|
token: SyntaxToken,
|
|||
|
) -> SyntaxToken</h4></section></summary><div class="docblock"><p>Descends the token into expansions, returning the first token that matches the input
|
|||
|
token’s [<code>SyntaxKind</code>] and text.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.original_range" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1221-1224">Source</a><h4 class="code-header">pub fn <a href="#method.original_range" class="fn">original_range</a>(&self, node: &SyntaxNode) -> <a class="type" href="type.FileRange.html" title="type hir::FileRange">FileRange</a></h4></section></summary><div class="docblock"><p>Attempts to map the node out of macro expanded files returning the original file range.
|
|||
|
If upmapping is not possible, this will fall back to the range of the macro call of the
|
|||
|
macro file the node resides in.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.original_range_opt" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1227-1232">Source</a><h4 class="code-header">pub fn <a href="#method.original_range_opt" class="fn">original_range_opt</a>(&self, node: &SyntaxNode) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="type" href="type.FileRange.html" title="type hir::FileRange">FileRange</a>></h4></section></summary><div class="docblock"><p>Attempts to map the node out of macro expanded files returning the original file range.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.original_ast_node" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1236-1243">Source</a><h4 class="code-header">pub fn <a href="#method.original_ast_node" class="fn">original_ast_node</a><N: AstNode>(&self, node: N) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><N></h4></section></summary><div class="docblock"><p>Attempts to map the node out of macro expanded files.
|
|||
|
This only work for attribute expansions, as other ones do not have nodes as input.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.original_syntax_node_rooted" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1247-1255">Source</a><h4 class="code-header">pub fn <a href="#method.original_syntax_node_rooted" class="fn">original_syntax_node_rooted</a>(
|
|||
|
&self,
|
|||
|
node: &SyntaxNode,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><SyntaxNode></h4></section></summary><div class="docblock"><p>Attempts to map the node out of macro expanded files.
|
|||
|
This only work for attribute expansions, as other ones do not have nodes as input.</p>
|
|||
|
</div></details><section id="method.diagnostics_display_range" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1257-1261">Source</a><h4 class="code-header">pub fn <a href="#method.diagnostics_display_range" class="fn">diagnostics_display_range</a>(&self, src: <a class="type" href="type.InFile.html" title="type hir::InFile">InFile</a><SyntaxNodePtr>) -> <a class="type" href="type.FileRange.html" title="type hir::FileRange">FileRange</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.ancestors_with_macros" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1271-1290">Source</a><h4 class="code-header">pub fn <a href="#method.ancestors_with_macros" class="fn">ancestors_with_macros</a>(
|
|||
|
&self,
|
|||
|
node: SyntaxNode,
|
|||
|
) -> impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = SyntaxNode> + <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + '_</h4></section></summary><div class="docblock"><p>Iterates the ancestors of the given node, climbing up macro expansions while doing so.</p>
|
|||
|
</div></details><section id="method.ancestors_at_offset_with_macros" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1292-1300">Source</a><h4 class="code-header">pub fn <a href="#method.ancestors_at_offset_with_macros" class="fn">ancestors_at_offset_with_macros</a>(
|
|||
|
&self,
|
|||
|
node: &SyntaxNode,
|
|||
|
offset: TextSize,
|
|||
|
) -> impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = SyntaxNode> + '_</h4></section><section id="method.resolve_lifetime_param" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1302-1311">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_lifetime_param" class="fn">resolve_lifetime_param</a>(
|
|||
|
&self,
|
|||
|
lifetime: &Lifetime,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.LifetimeParam.html" title="struct hir::LifetimeParam">LifetimeParam</a>></h4></section><section id="method.resolve_label" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1313-1317">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_label" class="fn">resolve_label</a>(&self, label: &Lifetime) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Label.html" title="struct hir::Label">Label</a>></h4></section><section id="method.resolve_type" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1319-1335">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_type" class="fn">resolve_type</a>(&self, ty: &Type) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Type.html" title="struct hir::Type">Type</a>></h4></section><section id="method.resolve_trait" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1337-1348">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_trait" class="fn">resolve_trait</a>(&self, path: &Path) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Trait.html" title="struct hir::Trait">Trait</a>></h4></section><section id="method.expr_adjustments" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1350-1391">Source</a><h4 class="code-header">pub fn <a href="#method.expr_adjustments" class="fn">expr_adjustments</a>(&self, expr: &Expr) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.Adjustment.html" title="struct hir::Adjustment">Adjustment</a>>></h4></section><section id="method.type_of_expr" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1393-1397">Source</a><h4 class="code-header">pub fn <a href="#method.type_of_expr" class="fn">type_of_expr</a>(&self, expr: &Expr) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.TypeInfo.html" title="struct hir::TypeInfo">TypeInfo</a>></h4></section><section id="method.type_of_pat" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1399-1403">Source</a><h4 class="code-header">pub fn <a href="#method.type_of_pat" class="fn">type_of_pat</a>(&self, pat: &Pat) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.TypeInfo.html" title="struct hir::TypeInfo">TypeInfo</a>></h4></section><details class="toggle method-toggle" open><summary><section id="method.type_of_binding_in_pat" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1408-1410">Source</a><h4 class="code-header">pub fn <a href="#method.type_of_binding_in_pat" class="fn">type_of_binding_in_pat</a>(&self, pat: &IdentPat) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Type.html" title="struct hir::Type">Type</a>></h4></section></summary><div class="docblock"><p>It also includes the changes that binding mode makes in the type. For example in
|
|||
|
<code>let ref x @ Some(_) = None</code> the result of <code>type_of_pat</code> is <code>Option<T></code> but the result
|
|||
|
of this function is <code>&mut Option<T></code></p>
|
|||
|
</div></details><section id="method.type_of_self" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1412-1414">Source</a><h4 class="code-header">pub fn <a href="#method.type_of_self" class="fn">type_of_self</a>(&self, param: &SelfParam) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Type.html" title="struct hir::Type">Type</a>></h4></section><section id="method.pattern_adjustments" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1416-1420">Source</a><h4 class="code-header">pub fn <a href="#method.pattern_adjustments" class="fn">pattern_adjustments</a>(&self, pat: &Pat) -> SmallVec<[<a class="struct" href="struct.Type.html" title="struct hir::Type">Type</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">1</a>]></h4></section><section id="method.binding_mode_of_pat" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1422-1424">Source</a><h4 class="code-header">pub fn <a href="#method.binding_mode_of_pat" class="fn">binding_mode_of_pat</a>(&self, pat: &IdentPat) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="enum.BindingMode.html" title="enum hir::BindingMode">BindingMode</a>></h4></section><section id="method.resolve_expr_as_callable" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1426-1428">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_expr_as_callable" class="fn">resolve_expr_as_callable</a>(&self, call: &Expr) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Callable.html" title="struct hir::Callable">Callable</a>></h4></section><section id="method.resolve_method_call" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1430-1432">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_method_call" class="fn">resolve_method_call</a>(&self, call: &MethodCallExpr) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Function.html" title="struct hir::Function">Function</a>></h4></section><details class="toggle method-toggle" open><summary><section id="method.resolve_method_call_fallback" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1435-1440">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_method_call_fallback" class="fn">resolve_method_call_fallback</a>(
|
|||
|
&self,
|
|||
|
call: &MethodCallExpr,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="enum" href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either">Either</a><<a class="struct" href="struct.Function.html" title="struct hir::Function">Function</a>, <a class="struct" href="struct.Field.html" title="struct hir::Field">Field</a>>, <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.GenericSubstitution.html" title="struct hir::GenericSubstitution">GenericSubstitution</a>>)></h4></section></summary><div class="docblock"><p>Attempts to resolve this call expression as a method call falling back to resolving it as a field.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.resolve_trait_impl_method" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1444-1456">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_trait_impl_method" class="fn">resolve_trait_impl_method</a>(
|
|||
|
&self,
|
|||
|
env: <a class="struct" href="struct.Type.html" title="struct hir::Type">Type</a>,
|
|||
|
trait_: <a class="struct" href="struct.Trait.html" title="struct hir::Trait">Trait</a>,
|
|||
|
func: <a class="struct" href="struct.Function.html" title="struct hir::Function">Function</a>,
|
|||
|
subst: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = <a class="struct" href="struct.Type.html" title="struct hir::Type">Type</a>>,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Function.html" title="struct hir::Function">Function</a>></h4></section></summary><div class="docblock"><p>Env is used to derive the trait environment</p>
|
|||
|
</div></details><section id="method.resolve_method_call_as_callable" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1488-1490">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_method_call_as_callable" class="fn">resolve_method_call_as_callable</a>(
|
|||
|
&self,
|
|||
|
call: &MethodCallExpr,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Callable.html" title="struct hir::Callable">Callable</a>></h4></section><section id="method.resolve_field" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1492-1494">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_field" class="fn">resolve_field</a>(
|
|||
|
&self,
|
|||
|
field: &FieldExpr,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either">Either</a><<a class="struct" href="struct.Field.html" title="struct hir::Field">Field</a>, <a class="struct" href="struct.TupleField.html" title="struct hir::TupleField">TupleField</a>>></h4></section><section id="method.resolve_field_fallback" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1496-1501">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_field_fallback" class="fn">resolve_field_fallback</a>(
|
|||
|
&self,
|
|||
|
field: &FieldExpr,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="enum" href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either">Either</a><<a class="enum" href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either">Either</a><<a class="struct" href="struct.Field.html" title="struct hir::Field">Field</a>, <a class="struct" href="struct.TupleField.html" title="struct hir::TupleField">TupleField</a>>, <a class="struct" href="struct.Function.html" title="struct hir::Function">Function</a>>, <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.GenericSubstitution.html" title="struct hir::GenericSubstitution">GenericSubstitution</a>>)></h4></section><section id="method.resolve_record_field" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1503-1509">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_record_field" class="fn">resolve_record_field</a>(
|
|||
|
&self,
|
|||
|
field: &RecordExprField,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="struct" href="struct.Field.html" title="struct hir::Field">Field</a>, <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Local.html" title="struct hir::Local">Local</a>>, <a class="struct" href="struct.Type.html" title="struct hir::Type">Type</a>)></h4></section><section id="method.resolve_record_field_with_substitution" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1511-1516">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_record_field_with_substitution" class="fn">resolve_record_field_with_substitution</a>(
|
|||
|
&self,
|
|||
|
field: &RecordExprField,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="struct" href="struct.Field.html" title="struct hir::Field">Field</a>, <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Local.html" title="struct hir::Local">Local</a>>, <a class="struct" href="struct.Type.html" title="struct hir::Type">Type</a>, <a class="struct" href="struct.GenericSubstitution.html" title="struct hir::GenericSubstitution">GenericSubstitution</a>)></h4></section><section id="method.resolve_record_pat_field" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1518-1520">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_record_pat_field" class="fn">resolve_record_pat_field</a>(
|
|||
|
&self,
|
|||
|
field: &RecordPatField,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="struct" href="struct.Field.html" title="struct hir::Field">Field</a>, <a class="struct" href="struct.Type.html" title="struct hir::Type">Type</a>)></h4></section><section id="method.resolve_record_pat_field_with_subst" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1522-1527">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_record_pat_field_with_subst" class="fn">resolve_record_pat_field_with_subst</a>(
|
|||
|
&self,
|
|||
|
field: &RecordPatField,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="struct" href="struct.Field.html" title="struct hir::Field">Field</a>, <a class="struct" href="struct.Type.html" title="struct hir::Type">Type</a>, <a class="struct" href="struct.GenericSubstitution.html" title="struct hir::GenericSubstitution">GenericSubstitution</a>)></h4></section><section id="method.resolve_macro_call" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1529-1539">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_macro_call" class="fn">resolve_macro_call</a>(&self, macro_call: &MacroCall) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Macro.html" title="struct hir::Macro">Macro</a>></h4></section><section id="method.is_proc_macro_call" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1541-1544">Source</a><h4 class="code-header">pub fn <a href="#method.is_proc_macro_call" class="fn">is_proc_macro_call</a>(&self, macro_call: &MacroCall) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section><section id="method.resolve_macro_call_arm" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1546-1555">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_macro_call_arm" class="fn">resolve_macro_call_arm</a>(&self, macro_call: &MacroCall) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>></h4></section><section id="method.is_unsafe_macro_call" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1557-1569">Source</a><h4 class="code-header">pub fn <a href="#method.is_unsafe_macro_call" class="fn">is_unsafe_macro_call</a>(&self, macro_call: &MacroCall) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section><section id="method.resolve_attr_macro_call" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1571-1578">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_attr_macro_call" class="fn">resolve_attr_macro_call</a>(&self, item: &Item) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Macro.html" title="struct hir::Macro">Macro</a>></h4></section><section id="method.resolve_path" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1580-1582">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_path" class="fn">resolve_path</a>(&self, path: &Path) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="enum.PathResolution.html" title="enum hir::PathResolution">PathResolution</a>></h4></section><section id="method.resolve_path_with_subst" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1584-1589">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_path_with_subst" class="fn">resolve_path_with_subst</a>(
|
|||
|
&self,
|
|||
|
path: &Path,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="enum" href="enum.PathResolution.html" title="enum hir::PathResolution">PathResolution</a>, <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.GenericSubstitution.html" title="struct hir::GenericSubstitution">GenericSubstitution</a>>)></h4></section><section id="method.resolve_use_type_arg" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1591-1593">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_use_type_arg" class="fn">resolve_use_type_arg</a>(&self, name: &NameRef) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.TypeParam.html" title="struct hir::TypeParam">TypeParam</a>></h4></section><section id="method.resolve_mod_path" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1595-1603">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_mod_path" class="fn">resolve_mod_path</a>(
|
|||
|
&self,
|
|||
|
scope: &SyntaxNode,
|
|||
|
path: &<a class="struct" href="struct.ModPath.html" title="struct hir::ModPath">ModPath</a>,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="enum" href="enum.ItemInNs.html" title="enum hir::ItemInNs">ItemInNs</a>>></h4></section><section id="method.resolve_mod_path_relative" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1605-1615">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_mod_path_relative" class="fn">resolve_mod_path_relative</a>(
|
|||
|
&self,
|
|||
|
to: <a class="struct" href="struct.Module.html" title="struct hir::Module">Module</a>,
|
|||
|
segments: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = <a class="struct" href="struct.Name.html" title="struct hir::Name">Name</a>>,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="enum" href="enum.ItemInNs.html" title="enum hir::ItemInNs">ItemInNs</a>>></h4></section><section id="method.resolve_bind_pat_to_const" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1621-1623">Source</a><h4 class="code-header">pub fn <a href="#method.resolve_bind_pat_to_const" class="fn">resolve_bind_pat_to_const</a>(&self, pat: &IdentPat) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="enum.ModuleDef.html" title="enum hir::ModuleDef">ModuleDef</a>></h4></section><section id="method.record_literal_missing_fields" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1625-1629">Source</a><h4 class="code-header">pub fn <a href="#method.record_literal_missing_fields" class="fn">record_literal_missing_fields</a>(
|
|||
|
&self,
|
|||
|
literal: &RecordExpr,
|
|||
|
) -> <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><(<a class="struct" href="struct.Field.html" title="struct hir::Field">Field</a>, <a class="struct" href="struct.Type.html" title="struct hir::Type">Type</a>)></h4></section><section id="method.record_pattern_missing_fields" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1631-1635">Source</a><h4 class="code-header">pub fn <a href="#method.record_pattern_missing_fields" class="fn">record_pattern_missing_fields</a>(
|
|||
|
&self,
|
|||
|
pattern: &RecordPat,
|
|||
|
) -> <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><(<a class="struct" href="struct.Field.html" title="struct hir::Field">Field</a>, <a class="struct" href="struct.Type.html" title="struct hir::Type">Type</a>)></h4></section><section id="method.to_def" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1642-1645">Source</a><h4 class="code-header">pub fn <a href="#method.to_def" class="fn">to_def</a><T: ToDef>(&self, src: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><T::Def></h4></section><section id="method.scope" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1651-1657">Source</a><h4 class="code-header">pub fn <a href="#method.scope" class="fn">scope</a>(&self, node: &SyntaxNode) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.SemanticsScope.html" title="struct hir::SemanticsScope">SemanticsScope</a><'db>></h4></section><section id="method.scope_at_offset" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1659-1671">Source</a><h4 class="code-header">pub fn <a href="#method.scope_at_offset" class="fn">scope_at_offset</a>(
|
|||
|
&self,
|
|||
|
node: &SyntaxNode,
|
|||
|
offset: TextSize,
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.SemanticsScope.html" title="struct hir::SemanticsScope">SemanticsScope</a><'db>></h4></section><details class="toggle method-toggle" open><summary><section id="method.source" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1674-1682">Source</a><h4 class="code-header">pub fn <a href="#method.source" class="fn">source</a><Def: <a class="trait" href="trait.HasSource.html" title="trait hir::HasSource">HasSource</a>>(&self, def: Def) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="type" href="type.InFile.html" title="type hir::InFile">InFile</a><Def::<a class="associatedtype" href="trait.HasSource.html#associatedtype.Ast" title="type hir::HasSource::Ast">Ast</a>>><div class="where">where
|
|||
|
Def::<a class="associatedtype" href="trait.HasSource.html#associatedtype.Ast" title="type hir::HasSource::Ast">Ast</a>: AstNode,</div></h4></section></summary><div class="docblock"><p>Search for a definition’s source and cache its syntax tree</p>
|
|||
|
</div></details><section id="method.assert_contains_node" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1743-1745">Source</a><h4 class="code-header">pub fn <a href="#method.assert_contains_node" class="fn">assert_contains_node</a>(&self, node: &SyntaxNode)</h4></section><section id="method.is_unsafe_method_call" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1785-1806">Source</a><h4 class="code-header">pub fn <a href="#method.is_unsafe_method_call" class="fn">is_unsafe_method_call</a>(&self, method_call_expr: &MethodCallExpr) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section><section id="method.is_unsafe_ref_expr" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1808-1825">Source</a><h4 class="code-header">pub fn <a href="#method.is_unsafe_ref_expr" class="fn">is_unsafe_ref_expr</a>(&self, ref_expr: &RefExpr) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section><section id="method.is_unsafe_ident_pat" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1827-1868">Source</a><h4 class="code-header">pub fn <a href="#method.is_unsafe_ident_pat" class="fn">is_unsafe_ident_pat</a>(&self, ident_pat: &IdentPat) -> <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="method.is_inside_unsafe" class="method"><a class="src rightside" href="../src/hir/semantics.rs.html#1871-1918">Source</a><h4 class="code-header">pub fn <a href="#method.is_inside_unsafe" class="fn">is_inside_unsafe</a>(&self, expr: &Expr) -> <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>Returns <code>true</code> if the <code>node</code> is inside an <code>unsafe</code> context.</p>
|
|||
|
</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-SemanticsImpl%3C'db%3E" class="impl"><a href="#impl-Freeze-for-SemanticsImpl%3C'db%3E" class="anchor">§</a><h3 class="code-header">impl<'db> !<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.SemanticsImpl.html" title="struct hir::SemanticsImpl">SemanticsImpl</a><'db></h3></section><section id="impl-RefUnwindSafe-for-SemanticsImpl%3C'db%3E" class="impl"><a href="#impl-RefUnwindSafe-for-SemanticsImpl%3C'db%3E" class="anchor">§</a><h3 class="code-header">impl<'db> !<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.SemanticsImpl.html" title="struct hir::SemanticsImpl">SemanticsImpl</a><'db></h3></section><section id="impl-Send-for-SemanticsImpl%3C'db%3E" class="impl"><a href="#impl-Send-for-SemanticsImpl%3C'db%3E" class="anchor">§</a><h3 class="code-header">impl<'db> !<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.SemanticsImpl.html" title="struct hir::SemanticsImpl">SemanticsImpl</a><'db></h3></section><section id="impl-Sync-for-SemanticsImpl%3C'db%3E" class="impl"><a href="#impl-Sync-for-SemanticsImpl%3C'db%3E" class="anchor">§</a><h3 class="code-header">impl<'db> !<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.SemanticsImpl.html" title="struct hir::SemanticsImpl">SemanticsImpl</a><'db></h3></section><section id="impl-Unpin-for-SemanticsImpl%3C'db%3E" class="impl"><a href="#impl-Unpin-for-SemanticsImpl%3C'db%3E" class="anchor">§</a><h3 class="code-header">impl<'db> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.SemanticsImpl.html" title="struct hir::SemanticsImpl">SemanticsImpl</a><'db></h3></section><section id="impl-UnwindSafe-for-SemanticsImpl%3C'db%3E" class="impl"><a href="#impl-UnwindSafe-for-SemanticsImpl%3C'db%3E" class="anchor">§</a><h3 class="code-header">impl<'db> !<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.SemanticsImpl.html" title="struct hir::SemanticsImpl">SemanticsImpl</a><'db></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
|
|||
|
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#209">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where
|
|||
|
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#217">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where
|
|||
|
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Cast-for-T" class="impl"><a href="#impl-Cast-for-T" class="anchor">§</a><h3 class="code-header">impl<T> Cast for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cast" class="method trait-impl"><a href="#method.cast" class="anchor">§</a><h4 class="code-header">fn <a class="fn">cast</a><U>(self, interner: <U as HasInterner>::Interner) -> U<div class="where">where
|
|||
|
Self: CastTo<U>,
|
|||
|
U: HasInterner,</div></h4></section></summary><div class='docblock'>Cast a value to type <code>U</code> using <code>CastTo</code>.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#765">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#768">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
|
|||
|
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Instrument-for-T" class="impl"><a href="#impl-Instrument-for-T" class="anchor">§</a><h3 class="code-header">impl<T> Instrument for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.instrument" class="method trait-impl"><a href="#method.instrument" class="anchor">§</a><h4 class="code-header">fn <a class="fn">instrument</a>(self, span: Span) -> Instrumented<Self></h4></section></summary><div class='docblock'>Instruments this type with the provided [<code>Span</code>], returning an
|
|||
|
<code>Instrumented</code> wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.in_current_span" class="method trait-impl"><a href="#method.in_current_span" class="anchor">§</a><h4 class="code-header">fn <a class="fn">in_current_span</a>(self) -> Instrumented<Self></h4></section></summary><div class='docblock'>Instruments this type with the <a href="super::Span::current()">current</a> <a href="crate::Span"><code>Span</code></a>, returning an
|
|||
|
<code>Instrumented</code> wrapper. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#748-750">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where
|
|||
|
U: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#758">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
|
|||
|
<p>That is, this conversion is whatever the implementation of
|
|||
|
<code><a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
|
|||
|
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-IntoBox%3Cdyn+Any%3E-for-T" class="impl"><a href="#impl-IntoBox%3Cdyn+Any%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> IntoBox<dyn <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a>> for T<div class="where">where
|
|||
|
T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_box" class="method trait-impl"><a href="#method.into_box" class="anchor">§</a><h4 class="code-header">fn <a class="fn">into_box</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a>></h4></section></summary><div class='docblock'>Convert self into the appropriate boxed form.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-IntoEither-for-T" class="impl"><a class="src rightside" href="https://docs.rs/either/1/src/either/into_either.rs.html#64">Source</a><a href="#impl-IntoEither-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html" title="trait either::into_either::IntoEither">IntoEither</a> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_either" class="method trait-impl"><a class="src rightside" href="https://docs.rs/either/1/src/either/into_either.rs.html#29">Source</a><a href="#method.into_either" class="anchor">§</a><h4 class="code-header">fn <a href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html#method.into_either" class="fn">into_either</a>(self, into_left: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>) -> <a class="enum" href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either">Either</a><Self, Self></h4></section></summary><div class='docblock'>Converts <code>self</code> into a <a href="https://docs.rs/either/1/either/enum.Either.html#variant.Left" title="variant either::Either::Left"><code>Left</code></a> variant of <a href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either"><code>Either<Self, Self></code></a>
|
|||
|
if <code>into_left</code> is <code>true</code>.
|
|||
|
Converts <code>self</code> into a <a href="https://docs.rs/either/1/either/enum.Either.html#variant.Right" title="variant either::Either::Right"><code>Right</code></a> variant of <a href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either"><code>Either<Self, Self></code></a>
|
|||
|
otherwise. <a href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html#method.into_either">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.into_either_with" class="method trait-impl"><a class="src rightside" href="https://docs.rs/either/1/src/either/into_either.rs.html#55-57">Source</a><a href="#method.into_either_with" class="anchor">§</a><h4 class="code-header">fn <a href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html#method.into_either_with" class="fn">into_either_with</a><F>(self, into_left: F) -> <a class="enum" href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either">Either</a><Self, Self><div class="where">where
|
|||
|
F: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&Self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class='docblock'>Converts <code>self</code> into a <a href="https://docs.rs/either/1/either/enum.Either.html#variant.Left" title="variant either::Either::Left"><code>Left</code></a> variant of <a href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either"><code>Either<Self, Self></code></a>
|
|||
|
if <code>into_left(&self)</code> returns <code>true</code>.
|
|||
|
Converts <code>self</code> into a <a href="https://docs.rs/either/1/either/enum.Either.html#variant.Right" title="variant either::Either::Right"><code>Right</code></a> variant of <a href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either"><code>Either<Self, Self></code></a>
|
|||
|
otherwise. <a href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html#method.into_either_with">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#805-807">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where
|
|||
|
U: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#809">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#812">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#790-792">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where
|
|||
|
U: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#794">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#797">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-WithSubscriber-for-T" class="impl"><a href="#impl-WithSubscriber-for-T" class="anchor">§</a><h3 class="code-header">impl<T> WithSubscriber for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.with_subscriber" class="method trait-impl"><a href="#method.with_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_subscriber</a><S>(self, subscriber: S) -> WithDispatch<Self><div class="where">where
|
|||
|
S: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><Dispatch>,</div></h4></section></summary><div class='docblock'>Attaches the provided <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
|
|||
|
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.with_current_subscriber" class="method trait-impl"><a href="#method.with_current_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_current_subscriber</a>(self) -> WithDispatch<Self></h4></section></summary><div class='docblock'>Attaches the current <a href="crate::dispatcher#setting-the-default-subscriber">default</a> <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
|
|||
|
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details></div></details><section id="impl-Captures%3C'a%3E-for-T" class="impl"><a href="#impl-Captures%3C'a%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<'a, T> Captures<'a> for T<div class="where">where
|
|||
|
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></div></section></div></main></body></html>
|