blob: d1a04aef796661b041e7eaf62708f494255c09d5 [file] [log] [blame] [edit]
<!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 `WithFixture` trait in crate `test_fixture`."><title>WithFixture in test_fixture - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-84e720fa.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="test_fixture" data-themes="" data-resource-suffix="" data-rustdoc-version="1.89.0 (29483883e 2025-08-04)" data-channel="1.89.0" data-search-js="search-92309212.js" data-settings-js="settings-5514c975.js" ><script src="../static.files/storage-4e99c027.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-fd3af306.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-32bb7600.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="../test_fixture/index.html">test_<wbr>fixture</a><span class="version">0.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">With<wbr>Fixture</a></h2><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.test_crate" title="test_crate">test_crate</a></li><li><a href="#method.with_files" title="with_files">with_files</a></li><li><a href="#method.with_files_extra_proc_macros" title="with_files_extra_proc_macros">with_files_extra_proc_macros</a></li><li><a href="#method.with_many_files" title="with_many_files">with_many_files</a></li><li><a href="#method.with_position" title="with_position">with_position</a></li><li><a href="#method.with_range" title="with_range">with_range</a></li><li><a href="#method.with_range_or_offset" title="with_range_or_offset">with_range_or_offset</a></li><li><a href="#method.with_single_file" title="with_single_file">with_single_file</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate test_<wbr>fixture</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">test_fixture</a></div><h1>Trait <span class="trait">WithFixture</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/test_fixture/lib.rs.html#34-109">Source</a> </span></div><pre class="rust item-decl"><code>pub trait WithFixture:
<a class="trait" href="https://doc.rust-lang.org/1.89.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a>
+ ExpandDatabase
+ SourceDatabase
+ 'static {
// Provided methods
fn <a href="#method.with_single_file" class="fn">with_single_file</a>(ra_fixture: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.str.html">str</a>) -&gt; (Self, EditionedFileId) { ... }
<span class="item-spacer"></span> fn <a href="#method.with_many_files" class="fn">with_many_files</a>(ra_fixture: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.str.html">str</a>) -&gt; (Self, <a class="struct" href="https://doc.rust-lang.org/1.89.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;EditionedFileId&gt;) { ... }
<span class="item-spacer"></span> fn <a href="#method.with_files" class="fn">with_files</a>(ra_fixture: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.str.html">str</a>) -&gt; Self { ... }
<span class="item-spacer"></span> fn <a href="#method.with_files_extra_proc_macros" class="fn">with_files_extra_proc_macros</a>(
ra_fixture: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.str.html">str</a>,
proc_macros: <a class="struct" href="https://doc.rust-lang.org/1.89.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;(<a class="struct" href="https://doc.rust-lang.org/1.89.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, ProcMacro)&gt;,
) -&gt; Self { ... }
<span class="item-spacer"></span> fn <a href="#method.with_position" class="fn">with_position</a>(ra_fixture: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.str.html">str</a>) -&gt; (Self, FilePosition) { ... }
<span class="item-spacer"></span> fn <a href="#method.with_range" class="fn">with_range</a>(ra_fixture: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.str.html">str</a>) -&gt; (Self, FileRange) { ... }
<span class="item-spacer"></span> fn <a href="#method.with_range_or_offset" class="fn">with_range_or_offset</a>(
ra_fixture: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.str.html">str</a>,
) -&gt; (Self, EditionedFileId, RangeOrOffset) { ... }
<span class="item-spacer"></span> fn <a href="#method.test_crate" class="fn">test_crate</a>(&amp;self) -&gt; Crate { ... }
}</code></pre><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><section id="method.with_single_file" class="method"><a class="src rightside" href="../src/test_fixture/lib.rs.html#36-44">Source</a><h4 class="code-header">fn <a href="#method.with_single_file" class="fn">with_single_file</a>(ra_fixture: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.str.html">str</a>) -&gt; (Self, EditionedFileId)</h4></section><section id="method.with_many_files" class="method"><a class="src rightside" href="../src/test_fixture/lib.rs.html#47-55">Source</a><h4 class="code-header">fn <a href="#method.with_many_files" class="fn">with_many_files</a>(ra_fixture: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.str.html">str</a>) -&gt; (Self, <a class="struct" href="https://doc.rust-lang.org/1.89.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;EditionedFileId&gt;)</h4></section><section id="method.with_files" class="method"><a class="src rightside" href="../src/test_fixture/lib.rs.html#58-64">Source</a><h4 class="code-header">fn <a href="#method.with_files" class="fn">with_files</a>(ra_fixture: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.str.html">str</a>) -&gt; Self</h4></section><section id="method.with_files_extra_proc_macros" class="method"><a class="src rightside" href="../src/test_fixture/lib.rs.html#67-76">Source</a><h4 class="code-header">fn <a href="#method.with_files_extra_proc_macros" class="fn">with_files_extra_proc_macros</a>(
ra_fixture: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.str.html">str</a>,
proc_macros: <a class="struct" href="https://doc.rust-lang.org/1.89.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;(<a class="struct" href="https://doc.rust-lang.org/1.89.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, ProcMacro)&gt;,
) -&gt; Self</h4></section><section id="method.with_position" class="method"><a class="src rightside" href="../src/test_fixture/lib.rs.html#79-83">Source</a><h4 class="code-header">fn <a href="#method.with_position" class="fn">with_position</a>(ra_fixture: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.str.html">str</a>) -&gt; (Self, FilePosition)</h4></section><section id="method.with_range" class="method"><a class="src rightside" href="../src/test_fixture/lib.rs.html#86-90">Source</a><h4 class="code-header">fn <a href="#method.with_range" class="fn">with_range</a>(ra_fixture: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.str.html">str</a>) -&gt; (Self, FileRange)</h4></section><section id="method.with_range_or_offset" class="method"><a class="src rightside" href="../src/test_fixture/lib.rs.html#93-104">Source</a><h4 class="code-header">fn <a href="#method.with_range_or_offset" class="fn">with_range_or_offset</a>(
ra_fixture: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.89.0/std/primitive.str.html">str</a>,
) -&gt; (Self, EditionedFileId, RangeOrOffset)</h4></section><section id="method.test_crate" class="method"><a class="src rightside" href="../src/test_fixture/lib.rs.html#106-108">Source</a><h4 class="code-header">fn <a href="#method.test_crate" class="fn">test_crate</a>(&amp;self) -&gt; Crate</h4></section></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.89.0/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-WithFixture-for-DB" class="impl"><a class="src rightside" href="../src/test_fixture/lib.rs.html#111">Source</a><a href="#impl-WithFixture-for-DB" class="anchor">§</a><h3 class="code-header">impl&lt;DB: ExpandDatabase + SourceDatabase + <a class="trait" href="https://doc.rust-lang.org/1.89.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + 'static&gt; <a class="trait" href="trait.WithFixture.html" title="trait test_fixture::WithFixture">WithFixture</a> for DB</h3></section></div><script src="../trait.impl/test_fixture/trait.WithFixture.js" async></script></section></div></main></body></html>