[−][src]Struct wgpu::Buffer
A handle to a GPU-accessible buffer.
Methods
impl Buffer
[src]
pub fn map_read(
&self,
start: BufferAddress,
size: BufferAddress
) -> impl Future<Output = Result<BufferReadMapping, BufferAsyncErr>>
[src]
&self,
start: BufferAddress,
size: BufferAddress
) -> impl Future<Output = Result<BufferReadMapping, BufferAsyncErr>>
Map the buffer for reading. The result is returned in a future.
For the future to complete, device.poll(...)
must be called elsewhere in the runtime, possibly integrated
into an event loop, run on a separate thread, or continually polled in the same task runtime that this
future will be run on.
It's expected that wgpu will eventually supply its own event loop infrastructure that will be easy to integrate into other event loops, like winit's.
pub fn map_write(
&self,
start: BufferAddress,
size: BufferAddress
) -> impl Future<Output = Result<BufferWriteMapping, BufferAsyncErr>>
[src]
&self,
start: BufferAddress,
size: BufferAddress
) -> impl Future<Output = Result<BufferWriteMapping, BufferAsyncErr>>
Map the buffer for writing. The result is returned in a future.
See the documentation of (map_read)[#method.map_read] for more information about how to run this future.
pub fn unmap(&self)
[src]
Flushes any pending write operations and unmaps the buffer from host memory.
Trait Implementations
impl Debug for Buffer
[src]
impl Drop for Buffer
[src]
impl PartialEq<Buffer> for Buffer
[src]
impl StructuralPartialEq for Buffer
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Buffer
impl Send for Buffer
impl Sync for Buffer
impl Unpin for Buffer
impl UnwindSafe for Buffer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,