|
|
|
|
<!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="http
|
|
|
|
|
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>
|