|
|
<!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 `BufferAccess` trait in crate `vulkano`."><meta name="keywords" content="rust, rustlang, rust-lang, BufferAccess"><title>vulkano::buffer::BufferAccess - 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><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[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><a href='../../vulkano/index.html'><div class='logo-container'><img src='https://raw.githubusercontent.com/vulkano-rs/vulkano/master/logo.png' alt='logo'></div></a><p class='location'>Trait BufferAccess</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.conflict_key">conflict_key</a><a href="#tymethod.conflicts_buffer">conflicts_buffer</a><a href="#tymethod.conflicts_image">conflicts_image</a><a href="#tymethod.increase_gpu_lock">increase_gpu_lock</a><a href="#tymethod.inner">inner</a><a href="#tymethod.size">size</a><a href="#tymethod.try_gpu_lock">try_gpu_lock</a><a href="#tymethod.unlock">unlock</a></div><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.as_buffer_slice">as_buffer_slice</a><a href="#method.index">index</a><a href="#method.into_buffer_slice">into_buffer_slice</a><a href="#method.slice">slice</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../index.html'>vulkano</a>::<wbr><a href='index.html'>buffer</a></p><script>window.sidebarCurrent = {name: 'BufferAccess', ty: 'trait', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><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='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/vulkano/buffer/traits.rs.html#26-139' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='../index.html'>vulkano</a>::<wbr><a href='index.html'>buffer</a>::<wbr><a class="trait" href=''>BufferAccess</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub unsafe trait BufferAccess: <a class="trait" href="../../vulkano/device/trait.DeviceOwned.html" title="trait vulkano::device::DeviceOwned">DeviceOwned</a> {
|
|
|
fn <a href='#tymethod.inner' class='fnname'>inner</a>(&self) -> <a class="struct" href="../../vulkano/buffer/struct.BufferInner.html" title="struct vulkano::buffer::BufferInner">BufferInner</a>;
|
|
|
<div class='item-spacer'></div> fn <a href='#tymethod.size' class='fnname'>size</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>;
|
|
|
<div class='item-spacer'></div> fn <a href='#tymethod.conflicts_buffer' class='fnname'>conflicts_buffer</a>(&self, other: &dyn <a class="trait" href="../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;
|
|
|
<div class='item-spacer'></div> fn <a href='#tymethod.conflicts_image' class='fnname'>conflicts_image</a>(&self, other: &dyn <a class="trait" href="../../vulkano/image/traits/trait.ImageAccess.html" title="trait vulkano::image::traits::ImageAccess">ImageAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;
|
|
|
<div class='item-spacer'></div> fn <a href='#tymethod.conflict_key' class='fnname'>conflict_key</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;
|
|
|
<div class='item-spacer'></div> fn <a href='#tymethod.try_gpu_lock' class='fnname'>try_gpu_lock</a>(<br> &self, <br> exclusive_access: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br> queue: &<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a><br> ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../../vulkano/sync/enum.AccessError.html" title="enum vulkano::sync::AccessError">AccessError</a>>;
|
|
|
<div class='item-spacer'></div> unsafe fn <a href='#tymethod.increase_gpu_lock' class='fnname'>increase_gpu_lock</a>(&self);
|
|
|
<div class='item-spacer'></div> unsafe fn <a href='#tymethod.unlock' class='fnname'>unlock</a>(&self);
|
|
|
|
|
|
fn <a href='#method.as_buffer_slice' class='fnname'>as_buffer_slice</a>(&self) -> <a class="struct" href="../../vulkano/buffer/struct.BufferSlice.html" title="struct vulkano::buffer::BufferSlice">BufferSlice</a><Self::<a class="type" href="../../vulkano/buffer/trait.TypedBufferAccess.html#associatedtype.Content" title="type vulkano::buffer::TypedBufferAccess::Content">Content</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self><br> <span class="where">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="../../vulkano/buffer/trait.TypedBufferAccess.html" title="trait vulkano::buffer::TypedBufferAccess">TypedBufferAccess</a></span>,
|
|
|
{ ... }
|
|
|
<div class='item-spacer'></div> fn <a href='#method.slice' class='fnname'>slice</a><T>(&self, range: <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../vulkano/buffer/struct.BufferSlice.html" title="struct vulkano::buffer::BufferSlice">BufferSlice</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>T<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self>><br> <span class="where">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="../../vulkano/buffer/trait.TypedBufferAccess.html" title="trait vulkano::buffer::TypedBufferAccess">TypedBufferAccess</a><Content = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>T<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>></span>,
|
|
|
{ ... }
|
|
|
<div class='item-spacer'></div> fn <a href='#method.into_buffer_slice' class='fnname'>into_buffer_slice</a>(self) -> <a class="struct" href="../../vulkano/buffer/struct.BufferSlice.html" title="struct vulkano::buffer::BufferSlice">BufferSlice</a><Self::<a class="type" href="../../vulkano/buffer/trait.TypedBufferAccess.html#associatedtype.Content" title="type vulkano::buffer::TypedBufferAccess::Content">Content</a>, Self><br> <span class="where">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="../../vulkano/buffer/trait.TypedBufferAccess.html" title="trait vulkano::buffer::TypedBufferAccess">TypedBufferAccess</a></span>,
|
|
|
{ ... }
|
|
|
<div class='item-spacer'></div> fn <a href='#method.index' class='fnname'>index</a><T>(&self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../vulkano/buffer/struct.BufferSlice.html" title="struct vulkano::buffer::BufferSlice">BufferSlice</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>T<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self>><br> <span class="where">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="../../vulkano/buffer/trait.TypedBufferAccess.html" title="trait vulkano::buffer::TypedBufferAccess">TypedBufferAccess</a><Content = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>T<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>></span>,
|
|
|
{ ... }
|
|
|
}</pre></div><div class='docblock'><p>Trait for objects that represent a way for the GPU to have access to a buffer or a slice of a
|
|
|
buffer.</p>
|
|
|
<p>See also <code>TypedBufferAccess</code>.</p>
|
|
|
</div>
|
|
|
<h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.inner' class='method'><code id='inner.v'>fn <a href='#tymethod.inner' class='fnname'>inner</a>(&self) -> <a class="struct" href="../../vulkano/buffer/struct.BufferInner.html" title="struct vulkano::buffer::BufferInner">BufferInner</a></code></h3><div class='docblock'><p>Returns the inner information about this buffer.</p>
|
|
|
</div><h3 id='tymethod.size' class='method'><code id='size.v'>fn <a href='#tymethod.size' class='fnname'>size</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></h3><div class='docblock'><p>Returns the size of the buffer in bytes.</p>
|
|
|
</div><h3 id='tymethod.conflicts_buffer' class='method'><code id='conflicts_buffer.v'>fn <a href='#tymethod.conflicts_buffer' class='fnname'>conflicts_buffer</a>(&self, other: &dyn <a class="trait" href="../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><div class='docblock'><p>Returns true if an access to <code>self</code> potentially overlaps the same memory as an access to
|
|
|
<code>other</code>.</p>
|
|
|
<p>If this function returns <code>false</code>, this means that we are allowed to mutably access the
|
|
|
content of <code>self</code> at the same time as the content of <code>other</code> without causing a data
|
|
|
race.</p>
|
|
|
<p>Note that the function must be transitive. In other words if <code>conflicts(a, b)</code> is true and
|
|
|
<code>conflicts(b, c)</code> is true, then <code>conflicts(a, c)</code> must be true as well.</p>
|
|
|
</div><h3 id='tymethod.conflicts_image' class='method'><code id='conflicts_image.v'>fn <a href='#tymethod.conflicts_image' class='fnname'>conflicts_image</a>(&self, other: &dyn <a class="trait" href="../../vulkano/image/traits/trait.ImageAccess.html" title="trait vulkano::image::traits::ImageAccess">ImageAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><div class='docblock'><p>Returns true if an access to <code>self</code> potentially overlaps the same memory as an access to
|
|
|
<code>other</code>.</p>
|
|
|
<p>If this function returns <code>false</code>, this means that we are allowed to mutably access the
|
|
|
content of <code>self</code> at the same time as the content of <code>other</code> without causing a data
|
|
|
race.</p>
|
|
|
<p>Note that the function must be transitive. In other words if <code>conflicts(a, b)</code> is true and
|
|
|
<code>conflicts(b, c)</code> is true, then <code>conflicts(a, c)</code> must be true as well.</p>
|
|
|
</div><h3 id='tymethod.conflict_key' class='method'><code id='conflict_key.v'>fn <a href='#tymethod.conflict_key' class='fnname'>conflict_key</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code></h3><div class='docblock'><p>Returns a key that uniquely identifies the buffer. Two buffers or images that potentially
|
|
|
overlap in memory must return the same key.</p>
|
|
|
<p>The key is shared amongst all buffers and images, which means that you can make several
|
|
|
different buffer objects share the same memory, or make some buffer objects share memory
|
|
|
with images, as long as they return the same key.</p>
|
|
|
<p>Since it is possible to accidentally return the same key for memory ranges that don't
|
|
|
overlap, the <code>conflicts_buffer</code> or <code>conflicts_image</code> function should always be called to
|
|
|
verify whether they actually overlap.</p>
|
|
|
</div><h3 id='tymethod.try_gpu_lock' class='method'><code id='try_gpu_lock.v'>fn <a href='#tymethod.try_gpu_lock' class='fnname'>try_gpu_lock</a>(<br> &self, <br> exclusive_access: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br> queue: &<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../../vulkano/sync/enum.AccessError.html" title="enum vulkano::sync::AccessError">AccessError</a>></code></h3><div class='docblock'><p>Locks the resource for usage on the GPU. Returns an error if the lock can't be acquired.</p>
|
|
|
<p>This function exists to prevent the user from causing a data race by reading and writing
|
|
|
to the same resource at the same time.</p>
|
|
|
<p>If you call this function, you should call <code>unlock()</code> once the resource is no longer in use
|
|
|
by the GPU. The implementation is not expected to automatically perform any unlocking and
|
|
|
can rely on the fact that <code>unlock()</code> is going to be called.</p>
|
|
|
</div><h3 id='tymethod.increase_gpu_lock' class='method'><code id='increase_gpu_lock.v'>unsafe fn <a href='#tymethod.increase_gpu_lock' class='fnname'>increase_gpu_lock</a>(&self)</code></h3><div class='docblock'><p>Locks the resource for usage on the GPU. Supposes that the resource is already locked, and
|
|
|
simply increases the lock by one.</p>
|
|
|
<p>Must only be called after <code>try_gpu_lock()</code> succeeded.</p>
|
|
|
<p>If you call this function, you should call <code>unlock()</code> once the resource is no longer in use
|
|
|
by the GPU. The implementation is not expected to automatically perform any unlocking and
|
|
|
can rely on the fact that <code>unlock()</code> is going to be called.</p>
|
|
|
</div><h3 id='tymethod.unlock' class='method'><code id='unlock.v'>unsafe fn <a href='#tymethod.unlock' class='fnname'>unlock</a>(&self)</code></h3><div class='docblock'><p>Unlocks the resource previously acquired with <code>try_gpu_lock</code> or <code>increase_gpu_lock</code>.</p>
|
|
|
<h1 id="safety" class="section-header"><a href="#safety">Safety</a></h1>
|
|
|
<p>Must only be called once per previous lock.</p>
|
|
|
</div></div><span class='loading-content'>Loading content...</span>
|
|
|
<h2 id='provided-methods' class='small-section-header'>Provided methods<a href='#provided-methods' class='anchor'></a></h2><div class='methods'><h3 id='method.as_buffer_slice' class='method'><code id='as_buffer_slice.v'>fn <a href='#method.as_buffer_slice' class='fnname'>as_buffer_slice</a>(&self) -> <a class="struct" href="../../vulkano/buffer/struct.BufferSlice.html" title="struct vulkano::buffer::BufferSlice">BufferSlice</a><Self::<a class="type" href="../../vulkano/buffer/trait.TypedBufferAccess.html#associatedtype.Content" title="type vulkano::buffer::TypedBufferAccess::Content">Content</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="../../vulkano/buffer/trait.TypedBufferAccess.html" title="trait vulkano::buffer::TypedBufferAccess">TypedBufferAccess</a>, </span></code></h3><div class='docblock'><p>Builds a <code>BufferSlice</code> object holding the buffer by reference.</p>
|
|
|
</div><h3 id='method.slice' class='method'><code id='slice.v'>fn <a href='#method.slice' class='fnname'>slice</a><T>(&self, range: <a class="struct" href="https://doc.rust-lang.org/nightly/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../vulkano/buffer/struct.BufferSlice.html" title="struct vulkano::buffer::BufferSlice">BufferSlice</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>T<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self>> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="../../vulkano/buffer/trait.TypedBufferAccess.html" title="trait vulkano::buffer::TypedBufferAccess">TypedBufferAccess</a><Content = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>T<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>>, </span></code></h3><div class='docblock'><p>Builds a <code>BufferSlice</code> object holding part of the buffer by reference.</p>
|
|
|
<p>This method can only be called for buffers whose type is known to be an array.</p>
|
|
|
<p>This method can be used when you want to perform an operation on some part of the buffer
|
|
|
and not on the whole buffer.</p>
|
|
|
<p>Returns <code>None</code> if out of range.</p>
|
|
|
</div><h3 id='method.into_buffer_slice' class='method'><code id='into_buffer_slice.v'>fn <a href='#method.into_buffer_slice' class='fnname'>into_buffer_slice</a>(self) -> <a class="struct" href="../../vulkano/buffer/struct.BufferSlice.html" title="struct vulkano::buffer::BufferSlice">BufferSlice</a><Self::<a class="type" href="../../vulkano/buffer/trait.TypedBufferAccess.html#associatedtype.Content" title="type vulkano::buffer::TypedBufferAccess::Content">Content</a>, Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="../../vulkano/buffer/trait.TypedBufferAccess.html" title="trait vulkano::buffer::TypedBufferAccess">TypedBufferAccess</a>, </span></code></h3><div class='docblock'><p>Builds a <code>BufferSlice</code> object holding the buffer by value.</p>
|
|
|
</div><h3 id='method.index' class='method'><code id='index.v'>fn <a href='#method.index' class='fnname'>index</a><T>(&self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../vulkano/buffer/struct.BufferSlice.html" title="struct vulkano::buffer::BufferSlice">BufferSlice</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>T<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self>> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="../../vulkano/buffer/trait.TypedBufferAccess.html" title="trait vulkano::buffer::TypedBufferAccess">TypedBufferAccess</a><Content = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>T<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>>, </span></code></h3><div class='docblock'><p>Builds a <code>BufferSlice</code> object holding part of the buffer by reference.</p>
|
|
|
<p>This method can only be called for buffers whose type is known to be an array.</p>
|
|
|
<p>This method can be used when you want to perform an operation on a specific element of the
|
|
|
buffer and not on the whole buffer.</p>
|
|
|
<p>Returns <code>None</code> if out of range.</p>
|
|
|
</div></div><span class='loading-content'>Loading content...</span>
|
|
|
<h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'><h3 id='impl-BufferAccess' class='impl'><code class='in-band'>impl<T> BufferAccess for T <span class="where fmt-newline">where<br> T: <a class="trait" href="../../vulkano/trait.SafeDeref.html" title="trait vulkano::SafeDeref">SafeDeref</a>,<br> T::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a>: <a class="trait" href="../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>, </span></code><a href='#impl-BufferAccess' class='anchor'></a><a class='srclink' href='../../src/vulkano/buffer/traits.rs.html#151-194' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.inner' class="method hidden"><code id='inner.v-1'>fn <a href='#method.inner' class='fnname'>inner</a>(&self) -> <a class="struct" href="../../vulkano/buffer/struct.BufferInner.html" title="struct vulkano::buffer::BufferInner">BufferInner</a></code><a class='srclink' href='../../src/vulkano/buffer/traits.rs.html#156-158' title='goto source code'>[src]</a></h4><h4 id='method.size' class="method hidden"><code id='size.v-1'>fn <a href='#method.size' class='fnname'>size</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../src/vulkano/buffer/traits.rs.html#161-163' title='goto source code'>[src]</a></h4><h4 id='method.conflicts_buffer' class="method hidden"><code id='conflicts_buffer.v-1'>fn <a href='#method.conflicts_buffer' class='fnname'>conflicts_buffer</a>(&self, other: &dyn <a class="trait" href="../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/vulkano/buffer/traits.rs.html#166-168' title='goto source code'>[src]</a></h4><h4 id='method.conflicts_image' class="method hidden"><code id='conflicts_image.v-1'>fn <a href='#method.conflicts_image' class='fnname'>conflicts_image</a>(&self, other: &dyn <a class="trait" href="../../vulkano/image/traits/trait.ImageAccess.html" title="trait vulkano::image::traits::ImageAccess">ImageAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/vulkano/buffer/traits.rs.html#171-173' title='goto source code'>[src]</a></h4><h4 id='method.conflict_key' class="method hidden"><code id='conflict_key.v-1'>fn <a href='#method.conflict_key' class='fnname'>conflict_key</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../../src/vulkano/buffer/traits.rs.html#176-178' title='goto source code'>[src]</a></h4><h4 id='method.try_gpu_lock' class="method hidden"><code id='try_gpu_lock.v-1'>fn <a href='#method.try_gpu_lock' class='fnname'>try_gpu_lock</a>(<br> &self, <br> exclusive_access: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br> queue: &<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../../vulkano/sync/enum.AccessError.html" title="enum vulkano::sync::AccessError">AccessError</a>></code><a class='srclink' href='../../src/vulkano/buffer/traits.rs.html#181-183' title='goto source code'>[src]</a></h4><h4 id='method.increase_gpu_lock' class="method hidden"><code id='increase_gpu_lock.v-1'>unsafe fn <a href='#method.increase_gpu_lock' class='fnname'>increase_gpu_lock</a>(&self)</code><a class='srclink' href='../../src/vulkano/buffer/traits.rs.html#186-188' title='goto source code'>[src]</a></h4><h4 id='method.unlock' class="method hidden"><code id='unlock.v-1'>unsafe fn <a href='#method.unlock' class='fnname'>unlock</a>(&self)</code><a class='srclink' href='../../src/vulkano/buffer/traits.rs.html#191-193' title='goto source code'>[src]</a></h4></div><h3 id='impl-BufferAccess-1' class='impl'><code class='in-band'>impl<T, A> BufferAccess for <a class="struct" href="../../vulkano/buffer/cpu_pool/struct.CpuBufferPoolChunk.html" title="struct vulkano::buffer::cpu_pool::CpuBufferPoolChunk">CpuBufferPoolChunk</a><T, A> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../vulkano/memory/pool/trait.MemoryPool.html" title="trait vulkano::memory::pool::MemoryPool">MemoryPool</a>, </span></code><a href='#impl-BufferAccess-1' class='anchor'></a><a class='srclink' href='../../src/vulkano/buffer/cpu_pool.rs.html#594-683' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.inner-1' class="method hidden"><code id='inner.v-2'>fn <a href='#method.inner-1' class='fnname'>inner</a>(&self) -> <a class="struct" href="../../vulkano/buffer/struct.BufferInner.html" title="struct vulkano::buffer::BufferInner">BufferInner</a></code><a class='srclink' href='../../src/vulkano/buffer/cpu_pool.rs.html#598-603' title='goto source code'>[src]</a></h4><h4 id='method.size-1' class="method hidden"><code id='size.v-2'>fn <a href='#method.size-1' class='fnname'>size</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../src/vulkano/buffer/cpu_pool.rs.html#606-608' title='goto source code'>[src]</a></h4><h4 id='method.conflicts_buffer-1' class="method hidden"><code id='conflicts_buffer.v-2'>fn <a href='#method.conflicts_buffer-1' class='fnname'>conflicts_buffer</a>(&self, other: &dyn <a class="trait" href="../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/vulkano/buffer/cpu_pool.rs.html#611-613' title='goto source code'>[src]</a></h4><h4 id='method.conflicts_image-1' class="method hidden"><code id='conflicts_image.v-2'>fn <a href='#method.conflicts_image-1' class='fnname'>conflicts_image</a>(&self, other: &dyn <a class="trait" href="../../vulkano/image/traits/trait.ImageAccess.html" title="trait vulkano::image::traits::ImageAccess">ImageAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/vulkano/buffer/cpu_pool.rs.html#616-618' title='goto source code'>[src]</a></h4><h4 id='method.conflict_key-1' class="method hidden"><code id='conflict_key.v-2'>fn <a href='#method.conflict_key-1' class='fnname'>conflict_key</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../../src/vulkano/buffer/cpu_pool.rs.html#621-627' title='goto source code'>[src]</a></h4><h4 id='method.try_gpu_lock-1' class="method hidden"><code id='try_gpu_lock.v-2'>fn <a href='#method.try_gpu_lock-1' class='fnname'>try_gpu_lock</a>(&self, _: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, _: &<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../../vulkano/sync/enum.AccessError.html" title="enum vulkano::sync::AccessError">AccessError</a>></code><a class='srclink' href='../../src/vulkano/buffer/cpu_pool.rs.html#630-647' title='goto source code'>[src]</a></h4><h4 id='method.increase_gpu_lock-1' class="method hidden"><code id='increase_gpu_lock.v-2'>unsafe fn <a href='#method.increase_gpu_lock-1' class='fnname'>increase_gpu_lock</a>(&self)</code><a class='srclink' href='../../src/vulkano/buffer/cpu_pool.rs.html#650-666' title='goto source code'>[src]</a></h4><h4 id='method.unlock-1' class="method hidden"><code id='unlock.v-2'>unsafe fn <a href='#method.unlock-1' class='fnname'>unlock</a>(&self)</code><a class='srclink' href='../../src/vulkano/buffer/cpu_pool.rs.html#669-682' title='goto source code'>[src]</a></h4></div><h3 id='impl-BufferAccess-2' class='impl'><code class='in-band'>impl<T, A> BufferAccess for <a class="struct" href="../../vulkano/buffer/cpu_pool/struct.CpuBufferPoolSubbuffer.html" title="struct vulkano::buffer::cpu_pool::CpuBufferPoolSubbuffer">CpuBufferPoolSubbuffer</a><T, A> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../vulkano/memory/pool/trait.MemoryPool.html" title="trait vulkano::memory::pool::MemoryPool">MemoryPool</a>, </span></code><a href='#impl-BufferAccess-2' class='anchor'></a><a class='srclink' href='../../src/vulkano/buffer/cpu_pool.rs.html#732-774' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.inner-2' class="method hidden"><code id='inner.v-3'>fn <a href='#method.inner-2' class='fnname'>inner</a>(&self) -> <a class="struct" href="../../vulkano/buffer/struct.BufferInner.html" title="struct vulkano::buffer::BufferInner">BufferInner</a></code><a class='srclink' href='../../src/vulkano/buffer/cpu_pool.rs.html#736-738' title='goto source code'>[src]</a></h4><h4 id='method.size-2' class="method hidden"><code id='size.v-3'>fn <a href='#method.size-2' class='fnname'>size</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../src/vulkano/buffer/cpu_pool.rs.html#741-743' title='goto source code'>[src]</a></h4><h4 id='method.conflicts_buffer-2' class="method hidden"><code id='conflicts_buffer.v-3'>fn <a href='#method.conflicts_buffer-2' class='fnname'>conflicts_buffer</a>(&self, other: &dyn <a class="trait" href="../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/vulkano/buffer/cpu_pool.rs.html#746-748' title='goto source code'>[src]</a></h4><h4 id='method.conflicts_image-2' class="method hidden"><code id='conflicts_image.v-3'>fn <a href='#method.conflicts_image-2' class='fnname'>conflicts_image</a>(&self, other: &dyn <a class="trait" href="../../vulkano/image/traits/trait.ImageAccess.html" title="trait vulkano::image::traits::ImageAccess">ImageAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/vulkano/buffer/cpu_pool.rs.html#751-753' title='goto source code'>[src]</a></h4><h4 id='method.conflict_key-2' class="method hidden"><code id='conflict_key.v-3'>fn <a href='#method.conflict_key-2' class='fnname'>conflict_key</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../../src/vulkano/buffer/cpu_pool.rs.html#756-758' title='goto source code'>[src]</a></h4><h4 id='method.try_gpu_lock-2' class="method hidden"><code id='try_gpu_lock.v-3'>fn <a href='#method.try_gpu_lock-2' class='fnname'>try_gpu_lock</a>(&self, e: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, q: &<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../../vulkano/sync/enum.AccessError.html" title="enum vulkano::sync::AccessError">AccessError</a>></code><a class='srclink' href='../../src/vulkano/buffer/cpu_pool.rs.html#761-763' title='goto source code'>[src]</a></h4><h4 id='method.increase_gpu_lock-2' class="method hidden"><code id='increase_gpu_lock.v-3'>unsafe fn <a href='#method.increase_gpu_lock-2' class='fnname'>increase_gpu_lock</a>(&self)</code><a class='srclink' href='../../src/vulkano/buffer/cpu_pool.rs.html#766-768' title='goto source code'>[src]</a></h4><h4 id='method.unlock-2' class="method hidden"><code id='unlock.v-3'>unsafe fn <a href='#method.unlock-2' class='fnname'>unlock</a>(&self)</code><a class='srclink' href='../../src/vulkano/buffer/cpu_pool.rs.html#771-773' title='goto source code'>[src]</a></h4></div><h3 id='impl-BufferAccess-3' class='impl'><code class='in-band'>impl<T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, A> BufferAccess for <a class="struct" href="../../vulkano/buffer/cpu_access/struct.CpuAccessibleBuffer.html" title="struct vulkano::buffer::cpu_access::CpuAccessibleBuffer">CpuAccessibleBuffer</a><T, A> <span class="where fmt-newline">where<br> T: 'static + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, </span></code><a href='#impl-BufferAccess-3' class='anchor'></a><a class='srclink' href='../../src/vulkano/buffer/cpu_access.rs.html#304-428' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.inner-3' class="method hidden"><code id='inner.v-4'>fn <a href='#method.inner-3' class='fnname'>inner</a>(&self) -> <a class="struct" href="../../vulkano/buffer/struct.BufferInner.html" title="struct vulkano::buffer::BufferInner">BufferInner</a></code><a class='srclink' href='../../src/vulkano/buffer/cpu_access.rs.html#308-313' title='goto source code'>[src]</a></h4><h4 id='method.size-3' class="method hidden"><code id='size.v-4'>fn <a href='#method.size-3' class='fnname'>size</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../src/vulkano/buffer/cpu_access.rs.html#316-318' title='goto source code'>[src]</a></h4><h4 id='method.conflicts_buffer-3' class="method hidden"><code id='conflicts_buffer.v-4'>fn <a href='#method.conflicts_buffer-3' class='fnname'>conflicts_buffer</a>(&self, other: &dyn <a class="trait" href="../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/vulkano/buffer/cpu_access.rs.html#321-323' title='goto source code'>[src]</a></h4><h4 id='method.conflicts_image-3' class="method hidden"><code id='conflicts_image.v-4'>fn <a href='#method.conflicts_image-3' class='fnname'>conflicts_image</a>(&self, other: &dyn <a class="trait" href="../../vulkano/image/traits/trait.ImageAccess.html" title="trait vulkano::image::traits::ImageAccess">ImageAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/vulkano/buffer/cpu_access.rs.html#326-328' title='goto source code'>[src]</a></h4><h4 id='method.conflict_key-3' class="method hidden"><code id='conflict_key.v-4'>fn <a href='#method.conflict_key-3' class='fnname'>conflict_key</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../../src/vulkano/buffer/cpu_access.rs.html#331-333' title='goto source code'>[src]</a></h4><h4 id='method.try_gpu_lock-3' class="method hidden"><code id='try_gpu_lock.v-4'>fn <a href='#method.try_gpu_lock-3' class='fnname'>try_gpu_lock</a>(<br> &self, <br> exclusive_access: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br> _: &<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../../vulkano/sync/enum.AccessError.html" title="enum vulkano::sync::AccessError">AccessError</a>></code><a class='srclink' href='../../src/vulkano/buffer/cpu_access.rs.html#336-366' title='goto source code'>[src]</a></h4><h4 id='method.increase_gpu_lock-3' class="method hidden"><code id='increase_gpu_lock.v-4'>unsafe fn <a href='#method.increase_gpu_lock-3' class='fnname'>increase_gpu_lock</a>(&self)</code><a class='srclink' href='../../src/vulkano/buffer/cpu_access.rs.html#369-393' title='goto source code'>[src]</a></h4><h4 id='method.unlock-3' class="method hidden"><code id='unlock.v-4'>unsafe fn <a href='#method.unlock-3' class='fnname'>unlock</a>(&self)</code><a class='srclink' href='../../src/vulkano/buffer/cpu_access.rs.html#396-427' title='goto source code'>[src]</a></h4></div><h3 id='impl-BufferAccess-4' class='impl'><code class='in-band'>impl<T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, A> BufferAccess for <a class="struct" href="../../vulkano/buffer/device_local/struct.DeviceLocalBuffer.html" title="struct vulkano::buffer::device_local::DeviceLocalBuffer">DeviceLocalBuffer</a><T, A> <span class="where fmt-newline">where<br> T: 'static + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, </span></code><a href='#impl-BufferAccess-4' class='anchor'></a><a class='srclink' href='../../src/vulkano/buffer/device_local.rs.html#182-280' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.inner-4' class="method hidden"><code id='inner.v-5'>fn <a href='#method.inner-4' class='fnname'>inner</a>(&self) -> <a class="struct" href="../../vulkano/buffer/struct.BufferInner.html" title="struct vulkano::buffer::BufferInner">BufferInner</a></code><a class='srclink' href='../../src/vulkano/buffer/device_local.rs.html#186-191' title='goto source code'>[src]</a></h4><h4 id='method.size-4' class="method hidden"><code id='size.v-5'>fn <a href='#method.size-4' class='fnname'>size</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../src/vulkano/buffer/device_local.rs.html#194-196' title='goto source code'>[src]</a></h4><h4 id='method.conflicts_buffer-4' class="method hidden"><code id='conflicts_buffer.v-5'>fn <a href='#method.conflicts_buffer-4' class='fnname'>conflicts_buffer</a>(&self, other: &dyn <a class="trait" href="../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/vulkano/buffer/device_local.rs.html#199-201' title='goto source code'>[src]</a></h4><h4 id='method.conflicts_image-4' class="method hidden"><code id='conflicts_image.v-5'>fn <a href='#method.conflicts_image-4' class='fnname'>conflicts_image</a>(&self, other: &dyn <a class="trait" href="../../vulkano/image/traits/trait.ImageAccess.html" title="trait vulkano::image::traits::ImageAccess">ImageAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/vulkano/buffer/device_local.rs.html#204-206' title='goto source code'>[src]</a></h4><h4 id='method.conflict_key-4' class="method hidden"><code id='conflict_key.v-5'>fn <a href='#method.conflict_key-4' class='fnname'>conflict_key</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../../src/vulkano/buffer/device_local.rs.html#209-211' title='goto source code'>[src]</a></h4><h4 id='method.try_gpu_lock-4' class="method hidden"><code id='try_gpu_lock.v-5'>fn <a href='#method.try_gpu_lock-4' class='fnname'>try_gpu_lock</a>(&self, exclusive: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, _: &<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../../vulkano/sync/enum.AccessError.html" title="enum vulkano::sync::AccessError">AccessError</a>></code><a class='srclink' href='../../src/vulkano/buffer/device_local.rs.html#214-238' title='goto source code'>[src]</a></h4><h4 id='method.increase_gpu_lock-4' class="method hidden"><code id='increase_gpu_lock.v-5'>unsafe fn <a href='#method.increase_gpu_lock-4' class='fnname'>increase_gpu_lock</a>(&self)</code><a class='srclink' href='../../src/vulkano/buffer/device_local.rs.html#241-254' title='goto source code'>[src]</a></h4><h4 id='method.unlock-4' class="method hidden"><code id='unlock.v-5'>unsafe fn <a href='#method.unlock-4' class='fnname'>unlock</a>(&self)</code><a class='srclink' href='../../src/vulkano/buffer/device_local.rs.html#257-279' title='goto source code'>[src]</a></h4></div><h3 id='impl-BufferAccess-5' class='impl'><code class='in-band'>impl<T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, A> BufferAccess for <a class="struct" href="../../vulkano/buffer/immutable/struct.ImmutableBuffer.html" title="struct vulkano::buffer::immutable::ImmutableBuffer">ImmutableBuffer</a><T, A></code><a href='#impl-BufferAccess-5' class='anchor'></a><a class='srclink' href='../../src/vulkano/buffer/immutable.rs.html#316-365' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.inner-5' class="method hidden"><code id='inner.v-6'>fn <a href='#method.inner-5' class='fnname'>inner</a>(&self) -> <a class="struct" href="../../vulkano/buffer/struct.BufferInner.html" title="struct vulkano::buffer::BufferInner">BufferInner</a></code><a class='srclink' href='../../src/vulkano/buffer/immutable.rs.html#318-323' title='goto source code'>[src]</a></h4><h4 id='method.size-5' class="method hidden"><code id='size.v-6'>fn <a href='#method.size-5' class='fnname'>size</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../src/vulkano/buffer/immutable.rs.html#326-328' title='goto source code'>[src]</a></h4><h4 id='method.conflicts_buffer-5' class="method hidden"><code id='conflicts_buffer.v-6'>fn <a href='#method.conflicts_buffer-5' class='fnname'>conflicts_buffer</a>(&self, other: &dyn <a class="trait" href="../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/vulkano/buffer/immutable.rs.html#331-333' title='goto source code'>[src]</a></h4><h4 id='method.conflicts_image-5' class="method hidden"><code id='conflicts_image.v-6'>fn <a href='#method.conflicts_image-5' class='fnname'>conflicts_image</a>(&self, other: &dyn <a class="trait" href="../../vulkano/image/traits/trait.ImageAccess.html" title="trait vulkano::image::traits::ImageAccess">ImageAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/vulkano/buffer/immutable.rs.html#336-338' title='goto source code'>[src]</a></h4><h4 id='method.conflict_key-5' class="method hidden"><code id='conflict_key.v-6'>fn <a href='#method.conflict_key-5' class='fnname'>conflict_key</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../../src/vulkano/buffer/immutable.rs.html#341-343' title='goto source code'>[src]</a></h4><h4 id='method.try_gpu_lock-5' class="method hidden"><code id='try_gpu_lock.v-6'>fn <a href='#method.try_gpu_lock-5' class='fnname'>try_gpu_lock</a>(<br> &self, <br> exclusive_access: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br> _: &<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../../vulkano/sync/enum.AccessError.html" title="enum vulkano::sync::AccessError">AccessError</a>></code><a class='srclink' href='../../src/vulkano/buffer/immutable.rs.html#346-356' title='goto source code'>[src]</a></h4><h4 id='method.increase_gpu_lock-5' class="method hidden"><code id='increase_gpu_lock.v-6'>unsafe fn <a href='#method.increase_gpu_lock-5' class='fnname'>increase_gpu_lock</a>(&self)</code><a class='srclink' href='../../src/vulkano/buffer/immutable.rs.html#359-360' title='goto source code'>[src]</a></h4><h4 id='method.unlock-5' class="method hidden"><code id='unlock.v-6'>unsafe fn <a href='#method.unlock-5' class='fnname'>unlock</a>(&self)</code><a class='srclink' href='../../src/vulkano/buffer/immutable.rs.html#363-364' title='goto source code'>[src]</a></h4></div><h3 id='impl-BufferAccess-6' class='impl'><code class='in-band'>impl<T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, A> BufferAccess for <a class="struct" href="../../vulkano/buffer/immutable/struct.ImmutableBufferInitialization.html" title="struct vulkano::buffer::immutable::ImmutableBufferInitialization">ImmutableBufferInitialization</a><T, A></code><a href='#impl-BufferAccess-6' class='anchor'></a><a class='srclink' href='../../src/vulkano/buffer/immutable.rs.html#385-433' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.inner-6' class="method hidden"><code id='inner.v-7'>fn <a href='#method.inner-6' class='fnname'>inner</a>(&self) -> <a class="struct" href="../../vulkano/buffer/struct.BufferInner.html" title="struct vulkano::buffer::BufferInner">BufferInner</a></code><a class='srclink' href='../../src/vulkano/buffer/immutable.rs.html#387-389' title='goto source code'>[src]</a></h4><h4 id='method.size-6' class="method hidden"><code id='size.v-7'>fn <a href='#method.size-6' class='fnname'>size</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../src/vulkano/buffer/immutable.rs.html#392-394' title='goto source code'>[src]</a></h4><h4 id='method.conflicts_buffer-6' class="method hidden"><code id='conflicts_buffer.v-7'>fn <a href='#method.conflicts_buffer-6' class='fnname'>conflicts_buffer</a>(&self, other: &dyn <a class="trait" href="../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/vulkano/buffer/immutable.rs.html#397-399' title='goto source code'>[src]</a></h4><h4 id='method.conflicts_image-6' class="method hidden"><code id='conflicts_image.v-7'>fn <a href='#method.conflicts_image-6' class='fnname'>conflicts_image</a>(&self, other: &dyn <a class="trait" href="../../vulkano/image/traits/trait.ImageAccess.html" title="trait vulkano::image::traits::ImageAccess">ImageAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/vulkano/buffer/immutable.rs.html#402-404' title='goto source code'>[src]</a></h4><h4 id='method.conflict_key-6' class="method hidden"><code id='conflict_key.v-7'>fn <a href='#method.conflict_key-6' class='fnname'>conflict_key</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../../src/vulkano/buffer/immutable.rs.html#407-409' title='goto source code'>[src]</a></h4><h4 id='method.try_gpu_lock-6' class="method hidden"><code id='try_gpu_lock.v-7'>fn <a href='#method.try_gpu_lock-6' class='fnname'>try_gpu_lock</a>(&self, _: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, _: &<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../../vulkano/sync/enum.AccessError.html" title="enum vulkano::sync::AccessError">AccessError</a>></code><a class='srclink' href='../../src/vulkano/buffer/immutable.rs.html#412-422' title='goto source code'>[src]</a></h4><h4 id='method.increase_gpu_lock-6' class="method hidden"><code id='increase_gpu_lock.v-7'>unsafe fn <a href='#method.increase_gpu_lock-6' class='fnname'>increase_gpu_lock</a>(&self)</code><a class='srclink' href='../../src/vulkano/buffer/immutable.rs.html#425-427' title='goto source code'>[src]</a></h4><h4 id='method.unlock-6' class="method hidden"><code id='unlock.v-7'>unsafe fn <a href='#method.unlock-6' class='fnname'>unlock</a>(&self)</code><a class='srclink' href='../../src/vulkano/buffer/immutable.rs.html#430-432' title='goto source code'>[src]</a></h4></div><h3 id='impl-BufferAccess-7' class='impl'><code class='in-band'>impl<T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B> BufferAccess for <a class="struct" href="../../vulkano/buffer/struct.BufferSlice.html" title="struct vulkano::buffer::BufferSlice">BufferSlice</a><T, B> <span class="where fmt-newline">where<br> B: <a class="trait" href="../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>, </span></code><a href='#impl-BufferAccess-7' class='anchor'></a><a class='srclink' href='../../src/vulkano/buffer/slice.rs.html#212-258' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.inner-7' class="method hidden"><code id='inner.v-8'>fn <a href='#method.inner-7' class='fnname'>inner</a>(&self) -> <a class="struct" href="../../vulkano/buffer/struct.BufferInner.html" title="struct vulkano::buffer::BufferInner">BufferInner</a></code><a class='srclink' href='../../src/vulkano/buffer/slice.rs.html#216-222' title='goto source code'>[src]</a></h4><h4 id='method.size-7' class="method hidden"><code id='size.v-8'>fn <a href='#method.size-7' class='fnname'>size</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../src/vulkano/buffer/slice.rs.html#225-227' title='goto source code'>[src]</a></h4><h4 id='method.conflicts_buffer-7' class="method hidden"><code id='conflicts_buffer.v-8'>fn <a href='#method.conflicts_buffer-7' class='fnname'>conflicts_buffer</a>(&self, other: &dyn <a class="trait" href="../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/vulkano/buffer/slice.rs.html#230-232' title='goto source code'>[src]</a></h4><h4 id='method.conflicts_image-7' class="method hidden"><code id='conflicts_image.v-8'>fn <a href='#method.conflicts_image-7' class='fnname'>conflicts_image</a>(&self, other: &dyn <a class="trait" href="../../vulkano/image/traits/trait.ImageAccess.html" title="trait vulkano::image::traits::ImageAccess">ImageAccess</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/vulkano/buffer/slice.rs.html#235-237' title='goto source code'>[src]</a></h4><h4 id='method.conflict_key-7' class="method hidden"><code id='conflict_key.v-8'>fn <a href='#method.conflict_key-7' class='fnname'>conflict_key</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../../src/vulkano/buffer/slice.rs.html#240-242' title='goto source code'>[src]</a></h4><h4 id='method.try_gpu_lock-7' class="method hidden"><code id='try_gpu_lock.v-8'>fn <a href='#method.try_gpu_lock-7' class='fnname'>try_gpu_lock</a>(<br> &self, <br> exclusive_access: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br> queue: &<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../../vulkano/sync/enum.AccessError.html" title="enum vulkano::sync::AccessError">AccessError</a>></code><a class='srclink' href='../../src/vulkano/buffer/slice.rs.html#245-247' title='goto source code'>[src]</a></h4><h4 id='method.increase_gpu_lock-7' class="method hidden"><code id='increase_gpu_lock.v-8'>unsafe fn <a href='#method.increase_gpu_lock-7' class='fnname'>increase_gpu_lock</a>(&self)</code><a class='srclink' href='../../src/vulkano/buffer/slice.rs.html#250-252' title='goto source code'>[src]</a></h4><h4 id='method.unlock-7' class="method hidden"><code id='unlock.v-8'>unsafe fn <a href='#method.unlock-7' class='fnname'>unlock</a>(&self)</code><a class='srclink' href='../../src/vulkano/buffer/slice.rs.html#255-257' title='goto source code'>[src]</a></h4></div></div><span class='loading-content'>Loading content...</span><script type="text/javascript">window.inlined_types=new Set([]);</script><script type="text/javascript" async
|
|
|
src="../../implementors/vulkano/buffer/trait.BufferAccess.js">
|
|
|
</script></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><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 = "vulkano";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html> |