[][src]Struct nannou::wgpu::BufferBytes

pub struct BufferBytes { /* fields omitted */ }

A wrapper around a wgpu::Buffer containing bytes of a known length.

Methods

impl BufferBytes[src]

pub fn read<F>(&self, callback: F) where
    F: 'static + FnOnce(BufferMapAsyncResult<&[u8]>), 
[src]

Asynchronously maps the buffer of bytes to host memory and, once mapped, calls the given user callback with the data as a slice of bytes.

Note: The given callback will not be called until the memory is mapped and the device is polled. You should not rely on the callback being called immediately.

pub fn len_bytes(&self) -> BufferAddress[src]

The length of the wgpu::Buffer in bytes.

pub fn inner(&self) -> &Buffer[src]

A reference to the inner wgpu::Buffer.

pub fn into_inner(self) -> Buffer[src]

Consumes self and returns the inner wgpu::Buffer.

Trait Implementations

impl Debug for BufferBytes[src]

Auto Trait Implementations

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,