123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249 |
- <!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 `State` struct in crate `qcgpu`.">
- <meta name="keywords" content="rust, rustlang, rust-lang, State">
- <title>qcgpu::State - Rust</title>
- <link rel="stylesheet" type="text/css" href="../normalize.css">
- <link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle">
-
- <link rel="stylesheet" type="text/css" href="../dark.css">
- <link rel="stylesheet" type="text/css" href="../main.css" id="themeStyle">
- <script src="../storage.js"></script>
-
-
-
- </head>
- <body class="rustdoc struct">
- <!--[if lte IE 8]>
- <div class="warning">
- This old browser is unsupported and will most likely display funky
- things.
- </div>
- <![endif]-->
-
- <nav class="sidebar">
- <div class="sidebar-menu">☰</div>
-
- <p class='location'>Struct State</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.buffer">buffer</a><a href="#structfield.num_amps">num_amps</a><a href="#structfield.num_qubits">num_qubits</a><a href="#structfield.backend">backend</a></div><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.from_bit_string">from_bit_string</a><a href="#method.apply_gate">apply_gate</a><a href="#method.apply_all">apply_all</a><a href="#method.apply_controlled_gate">apply_controlled_gate</a><a href="#method.get_probabilities">get_probabilities</a><a href="#method.get_amplitudes">get_amplitudes</a><a href="#method.measure">measure</a><a href="#method.measure_many">measure_many</a><a href="#method.add_scratch">add_scratch</a><a href="#method.measure_scratch">measure_scratch</a><a href="#method.measure_first">measure_first</a><a href="#method.info">info</a><a href="#method.h">h</a><a href="#method.s">s</a><a href="#method.t">t</a><a href="#method.x">x</a><a href="#method.y">y</a><a href="#method.z">z</a><a href="#method.cx">cx</a><a href="#method.toffoli">toffoli</a><a href="#method.swap">swap</a><a href="#method.pow_mod">pow_mod</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a></div></div><p class='location'><a href='index.html'>qcgpu</a></p><script>window.sidebarCurrent = {name: 'State', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
- </nav>
- <div class="theme-picker">
- <button id="theme-picker" aria-label="Pick another theme!">
- <img src="../brush.svg" width="18" alt="Pick another theme!">
- </button>
- <div id="theme-choices"></div>
- </div>
- <script src="../theme.js"></script>
- <nav class="sub">
- <form class="search-form js-only">
- <div class="search-container">
- <input class="search-input" name="search"
- autocomplete="off"
- placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
- type="search">
- </div>
- </form>
- </nav>
- <section id='main' class="content">
- <h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>qcgpu</a>::<wbr><a class="struct" href=''>State</a></span><span class='out-of-band'><span id='render-detail'>
- <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
- [<span class='inner'>−</span>]
- </a>
- </span><a class='srclink' href='../src/qcgpu/state.rs.html#16-30' title='goto source code'>[src]</a></span></h1>
- <pre class='rust struct'>pub struct State {
- pub buffer: <a class="struct" href="../ocl/standard/buffer/struct.Buffer.html" title="struct ocl::standard::buffer::Buffer">Buffer</a><<a class="type" href="../num_complex/type.Complex32.html" title="type num_complex::Complex32">Complex32</a>>,
- pub num_amps: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
- pub num_qubits: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
- pub backend: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
- // some fields omitted
- }</pre><div class='docblock'><p>Representation of a quantum register</p>
- </div><h2 id='fields' class='fields small-section-header'>
- Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.buffer" class="structfield small-section-header">
- <a href="#structfield.buffer" class="anchor field"></a>
- <span id="buffer.v" class='invisible'>
- <code>buffer: <a class="struct" href="../ocl/standard/buffer/struct.Buffer.html" title="struct ocl::standard::buffer::Buffer">Buffer</a><<a class="type" href="../num_complex/type.Complex32.html" title="type num_complex::Complex32">Complex32</a>></code>
- </span></span><div class='docblock'><p>The OpenCL Buffer for the state vector</p>
- </div><span id="structfield.num_amps" class="structfield small-section-header">
- <a href="#structfield.num_amps" class="anchor field"></a>
- <span id="num_amps.v" class='invisible'>
- <code>num_amps: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code>
- </span></span><div class='docblock'><p>Number of amplitudes stored in the state vector</p>
- </div><span id="structfield.num_qubits" class="structfield small-section-header">
- <a href="#structfield.num_qubits" class="anchor field"></a>
- <span id="num_qubits.v" class='invisible'>
- <code>num_qubits: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code>
- </span></span><div class='docblock'><p>Number of qubits in the register</p>
- </div><span id="structfield.backend" class="structfield small-section-header">
- <a href="#structfield.backend" class="anchor field"></a>
- <span id="backend.v" class='invisible'>
- <code>backend: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code>
- </span></span><div class='docblock'><p>The OpenCL Backend used. Use the method <code>info()</code> to get the devices identifier</p>
- </div>
- <h2 id='methods' class='small-section-header'>
- Methods<a href='#methods' class='anchor'></a>
- </h2>
- <h3 id='impl' class='impl'><span class='in-band'><code>impl <a class="struct" href="../qcgpu/struct.State.html" title="struct qcgpu::State">State</a></code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#32-558' title='goto source code'>[src]</a></span></h3>
- <div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><code>pub fn <a href='#method.new' class='fnname'>new</a>(num_qubits: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, backend: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="../qcgpu/struct.State.html" title="struct qcgpu::State">State</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#42-81' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Create a new quantum register, with a given number of qubits.
- The backend is the OpenCL ID of the accelerator to use.</p>
- <p>The register will be initialized in the state |00...0></p>
- <pre class="rust rust-example-rendered">
- <span class="kw">let</span> <span class="ident">state</span> <span class="op">=</span> <span class="ident">qcgpu</span>::<span class="ident">State</span>::<span class="ident">new</span>(<span class="number">2</span>,<span class="number">0</span>);</pre>
- </div><h4 id='method.from_bit_string' class="method"><span id='from_bit_string.v' class='invisible'><code>pub fn <a href='#method.from_bit_string' class='fnname'>from_bit_string</a>(bit_string: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, backend: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="../qcgpu/struct.State.html" title="struct qcgpu::State">State</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#91-133' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Create a new quantum register, starting in the
- State given. The backend is the OpenCL ID of the
- accelerator to use.</p>
- <pre class="rust rust-example-rendered">
- <span class="kw">let</span> <span class="ident">state</span> <span class="op">=</span> <span class="ident">qcgpu</span>::<span class="ident">State</span>::<span class="ident">from_bit_string</span>(<span class="string">"|00>"</span>, <span class="number">1</span>);</pre>
- </div><h4 id='method.apply_gate' class="method"><span id='apply_gate.v' class='invisible'><code>pub fn <a href='#method.apply_gate' class='fnname'>apply_gate</a>(&mut self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, gate: <a class="struct" href="../qcgpu/gates/struct.Gate.html" title="struct qcgpu::gates::Gate">Gate</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#136-157' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Apply a gate to the target qubit</p>
- </div><h4 id='method.apply_all' class="method"><span id='apply_all.v' class='invisible'><code>pub fn <a href='#method.apply_all' class='fnname'>apply_all</a>(&mut self, gate: <a class="struct" href="../qcgpu/gates/struct.Gate.html" title="struct qcgpu::gates::Gate">Gate</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#160-164' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Apply a gate to every qubit in the register</p>
- </div><h4 id='method.apply_controlled_gate' class="method"><span id='apply_controlled_gate.v' class='invisible'><code>pub fn <a href='#method.apply_controlled_gate' class='fnname'>apply_controlled_gate</a>(&mut self, control: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, gate: <a class="struct" href="../qcgpu/gates/struct.Gate.html" title="struct qcgpu::gates::Gate">Gate</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#167-191' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Apply a gate to the register if the control qubit is 1.</p>
- </div><h4 id='method.get_probabilities' class="method"><span id='get_probabilities.v' class='invisible'><code>pub fn <a href='#method.get_probabilities' class='fnname'>get_probabilities</a>(&mut self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#197-215' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Return the probabilities of each outcome.</p>
- <p>The probabilitity of a state a|x> being measured
- is |a|^2.</p>
- </div><h4 id='method.get_amplitudes' class="method"><span id='get_amplitudes.v' class='invisible'><code>pub fn <a href='#method.get_amplitudes' class='fnname'>get_amplitudes</a>(&mut self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="type" href="../num_complex/type.Complex32.html" title="type num_complex::Complex32">Complex32</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#218-223' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Return the state vector of the quantum register</p>
- </div><h4 id='method.measure' class="method"><span id='measure.v' class='invisible'><code>pub fn <a href='#method.measure' class='fnname'>measure</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#226-244' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Measure the quantum register, returning the measured result</p>
- </div><h4 id='method.measure_many' class="method"><span id='measure_many.v' class='invisible'><code>pub fn <a href='#method.measure_many' class='fnname'>measure_many</a>(&mut self, num_iterations: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#249-273' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Preform multiple measurements, returning the results
- as a HashMap, with the key as the result and the value as the
- number of times that result was measured</p>
- </div><h4 id='method.add_scratch' class="method"><span id='add_scratch.v' class='invisible'><code>pub fn <a href='#method.add_scratch' class='fnname'>add_scratch</a>(&mut self, num_scratch: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#277-305' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Add qubits to the register. The qubits are initialized to zero.
- This should be used as scratch space.</p>
- </div><h4 id='method.measure_scratch' class="method"><span id='measure_scratch.v' class='invisible'><code>pub fn <a href='#method.measure_scratch' class='fnname'>measure_scratch</a>(&mut self, num_to_measure: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#339-364' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Measure the scratch qubits. The measurement is discarded, and
- the register size is reduced by <code>num_to_measure</code> qubits.</p>
- </div><h4 id='method.measure_first' class="method"><span id='measure_first.v' class='invisible'><code>pub fn <a href='#method.measure_first' class='fnname'>measure_first</a>(<br> &mut self, <br> num_to_measure: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, <br> num_iterations: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#369-403' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Preform multiple measurements of the first <code>num_to_measure</code>, returning the results
- as a HashMap, with the key as the result and the value as the
- number of times that result was measured</p>
- </div><h4 id='method.info' class="method"><span id='info.v' class='invisible'><code>pub fn <a href='#method.info' class='fnname'>info</a>(&self)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#406-411' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Print Information About The Device</p>
- </div><h4 id='method.h' class="method"><span id='h.v' class='invisible'><code>pub fn <a href='#method.h' class='fnname'>h</a>(&mut self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#419-423' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Hadamard Gate
- Shorthand Method</p>
- <p>Equivilent to <code>state.apply_gate(target, h());</code></p>
- </div><h4 id='method.s' class="method"><span id='s.v' class='invisible'><code>pub fn <a href='#method.s' class='fnname'>s</a>(&mut self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#429-433' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>S Gate
- Shorthand Method</p>
- <p>Equivilent to <code>state.apply_gate(target, s());</code></p>
- </div><h4 id='method.t' class="method"><span id='t.v' class='invisible'><code>pub fn <a href='#method.t' class='fnname'>t</a>(&mut self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#439-443' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>T Gate
- Shorthand Method</p>
- <p>Equivilent to <code>state.apply_gate(target, t());</code></p>
- </div><h4 id='method.x' class="method"><span id='x.v' class='invisible'><code>pub fn <a href='#method.x' class='fnname'>x</a>(&mut self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#449-453' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Pauli X Gate
- Shorthand Method</p>
- <p>Equivilent to <code>state.apply_gate(target, x());</code></p>
- </div><h4 id='method.y' class="method"><span id='y.v' class='invisible'><code>pub fn <a href='#method.y' class='fnname'>y</a>(&mut self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#459-463' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Pauli Y Gate
- Shorthand Method</p>
- <p>Equivilent to <code>state.apply_gate(target, y());</code></p>
- </div><h4 id='method.z' class="method"><span id='z.v' class='invisible'><code>pub fn <a href='#method.z' class='fnname'>z</a>(&mut self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#469-473' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Pauli Z Gate
- Shorthand Method</p>
- <p>Equivilent to <code>state.apply_gate(target, z());</code></p>
- </div><h4 id='method.cx' class="method"><span id='cx.v' class='invisible'><code>pub fn <a href='#method.cx' class='fnname'>cx</a>(&mut self, control: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#479-481' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Controlled Not Gate
- Shorthand method</p>
- <p>Equivilent to <code>state.apply_controlled_gate(control, target, x());</code></p>
- </div><h4 id='method.toffoli' class="method"><span id='toffoli.v' class='invisible'><code>pub fn <a href='#method.toffoli' class='fnname'>toffoli</a>(&mut self, control1: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, control2: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#485-512' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Toffoli (Controlled-Controlled-NOT gate)
- Shorthand method</p>
- </div><h4 id='method.swap' class="method"><span id='swap.v' class='invisible'><code>pub fn <a href='#method.swap' class='fnname'>swap</a>(&mut self, first_qubit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, second_qubit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#515-532' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Swap two qubits in the register</p>
- </div><h4 id='method.pow_mod' class="method"><span id='pow_mod.v' class='invisible'><code>pub fn <a href='#method.pow_mod' class='fnname'>pow_mod</a>(&mut self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, input_width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, output_width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#535-557' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Caclulates f(a) = x^a mod n.</p>
- </div></div>
- <h2 id='implementations' class='small-section-header'>
- Trait Implementations<a href='#implementations' class='anchor'></a>
- </h2>
- <h3 id='impl-Debug' class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../qcgpu/struct.State.html" title="struct qcgpu::State">State</a></code><a href='#impl-Debug' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#15' title='goto source code'>[src]</a></span></h3>
- <div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#15' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
- </div></div><h3 id='impl-Display' class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="../qcgpu/struct.State.html" title="struct qcgpu::State">State</a></code><a href='#impl-Display' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#560-578' title='goto source code'>[src]</a></span></h3>
- <div class='impl-items'><h4 id='method.fmt-1' class="method"><span id='fmt.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/qcgpu/state.rs.html#561-577' title='goto source code'>[src]</a></span></h4>
- <div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
- </div></div></section>
- <section id='search' class="content hidden"></section>
- <section class="footer"></section>
- <aside id="help" class="hidden">
- <div>
- <h1 class="hidden">Help</h1>
- <div class="shortcuts">
- <h2>Keyboard Shortcuts</h2>
- <dl>
- <dt><kbd>?</kbd></dt>
- <dd>Show this help dialog</dd>
- <dt><kbd>S</kbd></dt>
- <dd>Focus the search field</dd>
- <dt><kbd>↑</kbd></dt>
- <dd>Move up in search results</dd>
- <dt><kbd>↓</kbd></dt>
- <dd>Move down in search results</dd>
- <dt><kbd>↹</kbd></dt>
- <dd>Switch tab</dd>
- <dt><kbd>⏎</kbd></dt>
- <dd>Go to active search result</dd>
- <dt><kbd>+</kbd></dt>
- <dd>Expand all sections</dd>
- <dt><kbd>-</kbd></dt>
- <dd>Collapse all sections</dd>
- </dl>
- </div>
- <div class="infos">
- <h2>Search Tricks</h2>
- <p>
- Prefix searches with a type followed by a colon (e.g.
- <code>fn:</code>) to restrict the search to a given type.
- </p>
- <p>
- Accepted types are: <code>fn</code>, <code>mod</code>,
- <code>struct</code>, <code>enum</code>,
- <code>trait</code>, <code>type</code>, <code>macro</code>,
- and <code>const</code>.
- </p>
- <p>
- Search functions by type signature (e.g.
- <code>vec -> usize</code> or <code>* -> vec</code>)
- </p>
- </div>
- </div>
- </aside>
-
- <script>
- window.rootPath = "../";
- window.currentCrate = "qcgpu";
- </script>
- <script src="../main.js"></script>
- <script defer src="../search-index.js"></script>
- </body>
- </html>
|