pub struct Buffer { /* private fields */ }Implementations§
Source§impl Buffer
 
impl Buffer
Sourcepub unsafe fn from_raw(vk_buffer: Buffer) -> Self
 
pub unsafe fn from_raw(vk_buffer: Buffer) -> Self
§Safety
- vk_buffer’s memory must be managed by the caller
- Externally imported buffers can’t be mapped by wgpu
Sourcepub unsafe fn from_raw_managed(
    vk_buffer: Buffer,
    memory: DeviceMemory,
    offset: u64,
    size: u64,
) -> Self
 
pub unsafe fn from_raw_managed( vk_buffer: Buffer, memory: DeviceMemory, offset: u64, size: u64, ) -> Self
§Safety
- We will use this buffer and the buffer’s backing memory range as if we have exclusive ownership over it, until the wgpu resource is dropped and the wgpu-hal object is cleaned up
- Externally imported buffers can’t be mapped by wgpu
- offsetand- sizemust be valid with the allocation of- memory
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Buffer
impl !RefUnwindSafe for Buffer
impl Send for Buffer
impl Sync for Buffer
impl Unpin for Buffer
impl UnwindSafe for Buffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more