struct.BufferBuilder.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <!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 `BufferBuilder` struct in crate `ocl`."><meta name="keywords" content="rust, rustlang, rust-lang, BufferBuilder"><title>ocl::builders::BufferBuilder - 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="../../light.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">&#9776;</div><p class='location'>Struct BufferBuilder</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.context">context</a><a href="#method.queue">queue</a><a href="#method.flags">flags</a><a href="#method.use_host_slice">use_host_slice</a><a href="#method.copy_host_slice">copy_host_slice</a><a href="#method.len">len</a><a href="#method.fill_val">fill_val</a><a href="#method.fill_event">fill_event</a><a href="#method.build">build</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a></div></div><p class='location'><a href='../index.html'>ocl</a>::<wbr><a href='index.html'>builders</a></p><script>window.sidebarCurrent = {name: 'BufferBuilder', 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"><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>ocl</a>::<wbr><a href='index.html'>builders</a>::<wbr><a class="struct" href=''>BufferBuilder</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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/ocl/standard/buffer.rs.html#2137-2143' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust struct'><div class="docblock attributes">#[must_use = "builders do nothing unless \'::build\' is called"]
  2. </div>pub struct BufferBuilder&lt;'a, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>,&nbsp;</span> { /* fields omitted */ }</pre></div><div class='docblock'><p>A buffer builder.</p>
  3. </div>
  4. <h2 id='methods' class='small-section-header'>
  5. Methods<a href='#methods' class='anchor'></a>
  6. </h2>
  7. <h3 id='impl' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;'a, T&gt; <a class="struct" href="../../ocl/builders/struct.BufferBuilder.html" title="struct ocl::builders::BufferBuilder">BufferBuilder</a>&lt;'a, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'a + <a class="trait" href="../../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>,&nbsp;</span></code><a href='#impl' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/buffer.rs.html#2145-2415' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.new' class='fnname'>new</a>() -&gt; <a class="struct" href="../../ocl/builders/struct.BufferBuilder.html" title="struct ocl::builders::BufferBuilder">BufferBuilder</a>&lt;'a, T&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/buffer.rs.html#2147-2155' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns a new buffer builder.</p>
  8. </div><h4 id='method.context' class="method"><span id='context.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.context' class='fnname'>context</a>&lt;'o&gt;(self, context: &amp;'o <a class="struct" href="../../ocl/struct.Context.html" title="struct ocl::Context">Context</a>) -&gt; <a class="struct" href="../../ocl/builders/struct.BufferBuilder.html" title="struct ocl::builders::BufferBuilder">BufferBuilder</a>&lt;'a, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;'o: 'a,&nbsp;</span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/buffer.rs.html#2162-2167' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Sets the context with which to associate the buffer.</p>
  9. <p>May not be used in conjunction with <a href="builders/struct.BufferBuilder.html#method.queue"><code>::queue</code></a> (use one or the other).</p>
  10. </div><h4 id='method.queue' class="method"><span id='queue.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.queue' class='fnname'>queue</a>&lt;'b&gt;(self, default_queue: <a class="struct" href="../../ocl/struct.Queue.html" title="struct ocl::Queue">Queue</a>) -&gt; <a class="struct" href="../../ocl/builders/struct.BufferBuilder.html" title="struct ocl::builders::BufferBuilder">BufferBuilder</a>&lt;'a, T&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/buffer.rs.html#2192-2196' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Specifies the default queue used to be used by the buffer for all
  11. command enqueue operations (reads, writes, etc.).</p>
  12. <p>The default queue is the queue which will be used when enqueuing
  13. commands if no queue is specified.</p>
  14. <p>Without a default queue:</p>
  15. <div class='information'><div class='tooltip ignore'>ⓘ<span class='tooltiptext'>This example is not tested</span></div></div><pre class="rust rust-example-rendered ignore">
  16. <span class="ident">buffer</span>.<span class="ident">read</span>(<span class="ident">data</span>).<span class="ident">queue</span>(<span class="kw-2">&amp;</span><span class="ident">queue</span>).<span class="ident">enq</span>()<span class="question-mark">?</span>;</pre>
  17. <p>With a default queue:</p>
  18. <div class='information'><div class='tooltip ignore'>ⓘ<span class='tooltiptext'>This example is not tested</span></div></div><pre class="rust rust-example-rendered ignore">
  19. <span class="ident">buffer</span>.<span class="ident">read</span>(<span class="ident">data</span>).<span class="ident">enq</span>()<span class="question-mark">?</span>;</pre>
  20. <p>If this is set, the context associated with the <code>default_queue</code> will
  21. be used when creating the buffer. Attempting to specify the context
  22. separately (by calling <a href="builders/struct.BufferBuilder.html#method.context"><code>::context</code></a>) will cause a panic.</p>
  23. </div><h4 id='method.flags' class="method"><span id='flags.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.flags' class='fnname'>flags</a>&lt;'b&gt;(self, flags: <a class="struct" href="../../ocl/flags/struct.MemFlags.html" title="struct ocl::flags::MemFlags">MemFlags</a>) -&gt; <a class="struct" href="../../ocl/builders/struct.BufferBuilder.html" title="struct ocl::builders::BufferBuilder">BufferBuilder</a>&lt;'a, T&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/buffer.rs.html#2212-2218' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Sets the flags used when creating the buffer.</p>
  24. <p>Defaults to <code>flags::MEM_READ_WRITE</code> aka.
  25. <code>MemFlags::new().read_write()</code> if this is not set. See the <a href="https://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clCreateBuffer.html">SDK Docs</a>
  26. for more information about flags. Note that the names of all flags in
  27. this library have the <code>CL_</code> prefix removed for brevity.</p>
  28. <h3 id="panics" class="section-header"><a href="#panics">Panics</a></h3>
  29. <p>Due to its unsafety, setting the
  30. <code>MEM_USE_HOST_PTR</code>/<code>MemFlags::new()::use_host_ptr()</code> flag will cause a
  31. panic. Use the <code>::use_host_slice</code> method instead.</p>
  32. </div><h4 id='method.use_host_slice' class="method"><span id='use_host_slice.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub unsafe fn <a href='#method.use_host_slice' class='fnname'>use_host_slice</a>&lt;'d&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;host_slice: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'d [T]</a><br>) -&gt; <a class="struct" href="../../ocl/builders/struct.BufferBuilder.html" title="struct ocl::builders::BufferBuilder">BufferBuilder</a>&lt;'a, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;'d: 'a,&nbsp;</span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/buffer.rs.html#2249-2255' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Specifies a region of host memory to use as storage for the buffer.</p>
  33. <p>OpenCL implementations are allowed to cache the buffer contents
  34. pointed to by <code>host_slice</code> in device memory. This cached copy can be
  35. used when kernels are executed on a device.</p>
  36. <p>The result of OpenCL commands that operate on multiple buffer objects
  37. created with the same <code>host_slice</code> or overlapping host regions is
  38. considered to be undefined</p>
  39. <p>Refer to the <a href="https://www.khronos.org/registry/OpenCL/sdk/1.2/docs/man/xhtml/dataTypes.html">description of the alignment</a> rules for
  40. <code>host_slice</code> for memory objects (buffer and images) created using
  41. this method.</p>
  42. <p>Automatically sets the <code>flags::MEM_USE_HOST_PTR</code> aka.
  43. <code>MemFlags::new().use_host_ptr()</code> flag.</p>
  44. <h3 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h3>
  45. <p><code>::copy_host_slice</code> or <code>::use_host_slice</code> must not have already been
  46. called.</p>
  47. <h3 id="safety" class="section-header"><a href="#safety">Safety</a></h3>
  48. <p>The caller must ensure that <code>host_slice</code> lives until the buffer is
  49. destroyed. The caller must also ensure that only one buffer uses
  50. <code>host_slice</code> and that it is not tampered with inappropriately.</p>
  51. </div><h4 id='method.copy_host_slice' class="method"><span id='copy_host_slice.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.copy_host_slice' class='fnname'>copy_host_slice</a>&lt;'d&gt;(self, host_slice: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;'d [T]</a>) -&gt; <a class="struct" href="../../ocl/builders/struct.BufferBuilder.html" title="struct ocl::builders::BufferBuilder">BufferBuilder</a>&lt;'a, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;'d: 'a,&nbsp;</span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/buffer.rs.html#2267-2273' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Specifies a region of memory to copy into the buffer upon creation.</p>
  52. <p>Automatically sets the <code>flags::MEM_COPY_HOST_PTR</code> aka.
  53. <code>MemFlags::new().copy_host_ptr()</code> flag.</p>
  54. <h3 id="panics-2" class="section-header"><a href="#panics-2">Panics</a></h3>
  55. <p><code>::copy_host_slice</code> or <code>::use_host_slice</code> must not have already been
  56. called.</p>
  57. </div><h4 id='method.len' class="method"><span id='len.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.len' class='fnname'>len</a>&lt;'b, D&gt;(self, len: D) -&gt; <a class="struct" href="../../ocl/builders/struct.BufferBuilder.html" title="struct ocl::builders::BufferBuilder">BufferBuilder</a>&lt;'a, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../../ocl/enum.SpatialDims.html" title="enum ocl::SpatialDims">SpatialDims</a>&gt;,&nbsp;</span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/buffer.rs.html#2281-2285' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Sets the length for this buffer.</p>
  58. <p>Note that although sizes in the standard OpenCL API are expressed in
  59. bytes, sizes, lengths, and dimensions in this library are always
  60. specified in <code>bytes / sizeof(T)</code> (like everything else in Rust) unless
  61. otherwise noted.</p>
  62. </div><h4 id='method.fill_val' class="method"><span id='fill_val.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.fill_val' class='fnname'>fill_val</a>(self, fill_val: T) -&gt; <a class="struct" href="../../ocl/builders/struct.BufferBuilder.html" title="struct ocl::builders::BufferBuilder">BufferBuilder</a>&lt;'a, T&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/buffer.rs.html#2306-2309' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Allows the caller to automatically fill the buffer with a value (such
  63. as zero) immediately after creation.</p>
  64. <p>Use <a href="builders/struct.BufferBuilder.html#method.fill_event"><code>::fill_event</code></a> to set an event associated with the completion of
  65. the fill command if you want it to execute asynchronously (it will
  66. otherwise block the calling thread).</p>
  67. <p>Platforms that have trouble with <code>clEnqueueFillBuffer</code> such as
  68. <a href="http://portablecl.org/">pocl</a> should not use this option and should
  69. handle initializing buffers manually (using a kernel or copy host data
  70. flag).</p>
  71. <h3 id="examples" class="section-header"><a href="#examples">Examples</a></h3>
  72. <ul>
  73. <li>TODO: Provide examples once this stabilizes.</li>
  74. </ul>
  75. <p>[UNSTABLE]: May be changed or removed.</p>
  76. </div><h4 id='method.fill_event' class="method"><span id='fill_event.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.fill_event' class='fnname'>fill_event</a>&lt;'b, 'e, En&gt;(self, enew: En) -&gt; <a class="struct" href="../../ocl/builders/struct.BufferBuilder.html" title="struct ocl::builders::BufferBuilder">BufferBuilder</a>&lt;'a, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;'e: 'a,<br>&nbsp;&nbsp;&nbsp;&nbsp;En: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../../ocl/builders/enum.ClNullEventPtrEnum.html" title="enum ocl::builders::ClNullEventPtrEnum">ClNullEventPtrEnum</a>&lt;'e&gt;&gt;,&nbsp;</span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/buffer.rs.html#2326-2334' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Specifies the (empty) event to use for association with the completion
  77. of the fill command.</p>
  78. <p><code>enew</code> specifies an empty event (generally a <code>&amp;mut Event</code>) to be
  79. associated with the fill command which will be enqueued after creation
  80. and just before returning the new buffer. It is up to the caller to
  81. ensure that the command has completed before performing any other
  82. operations on the buffer. Failure to do so may cause the fill command
  83. to run <strong>after</strong> subsequently queued commands if multiple or
  84. out-of-order queues are being used.</p>
  85. <p>Not calling this method at all will cause the fill command to block
  86. before returning the new buffer and is the safe option if you don't
  87. want to worry about it.</p>
  88. </div><h4 id='method.build' class="method"><span id='build.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.build' class='fnname'>build</a>(self) -&gt; <a class="type" href="../../ocl/error/type.Result.html" title="type ocl::error::Result">OclResult</a>&lt;<a class="struct" href="../../ocl/struct.Buffer.html" title="struct ocl::Buffer">Buffer</a>&lt;T&gt;&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/buffer.rs.html#2340-2414' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Creates a buffer and returns it.</p>
  89. <p>Dimensions and either a context or default queue must be specified
  90. before calling <code>::build</code>.</p>
  91. </div></div>
  92. <h2 id='implementations' class='small-section-header'>
  93. Trait Implementations<a href='#implementations' class='anchor'></a>
  94. </h2>
  95. <div id='implementations-list'><h3 id='impl-Debug' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;'a, T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <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="../../ocl/builders/struct.BufferBuilder.html" title="struct ocl::builders::BufferBuilder">BufferBuilder</a>&lt;'a, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../ocl/traits/trait.OclPrm.html" title="trait ocl::traits::OclPrm">OclPrm</a>,&nbsp;</span></code><a href='#impl-Debug' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/buffer.rs.html#2136' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/buffer.rs.html#2136' title='goto source code'>[src]</a></td></tr></tbody></table></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>
  96. </div></div></div>
  97. <h2 id='synthetic-implementations' class='small-section-header'>
  98. Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a>
  99. </h2>
  100. <div id='synthetic-implementations-list'>
  101. <h3 id='impl-Send' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;'a, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../ocl/builders/struct.BufferBuilder.html" title="struct ocl::builders::BufferBuilder">BufferBuilder</a>&lt;'a, T&gt;</code><a href='#impl-Send' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;'a, T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../ocl/builders/struct.BufferBuilder.html" title="struct ocl::builders::BufferBuilder">BufferBuilder</a>&lt;'a, T&gt;</code><a href='#impl-Sync' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></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>&#9166;</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><p>Search multiple things at once by splitting your query with comma (e.g. <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "ocl";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>