pub struct Buffer { /* private fields */ }Expand description
Contains a VkBuffer and a memory allocation.
Implementations§
Source§impl Buffer
impl Buffer
pub fn new( alloc_access: Arc<dyn AllocatorAccess>, buffer_properties: BufferProperties, allocation_info: AllocationCreateInfo, ) -> VkResult<Self>
pub unsafe fn new_from_create_info( alloc_access: Arc<dyn AllocatorAccess>, buffer_create_info_builder: BufferCreateInfoBuilder<'_>, allocation_info: AllocationCreateInfo, ) -> VkResult<Self>
pub fn handle(&self) -> Buffer
pub fn properties(&self) -> &BufferProperties
pub fn allocator_access(&self) -> &Arc<dyn AllocatorAccess>
pub fn memory_allocation(&self) -> &MemoryAllocation
Trait Implementations§
Source§impl AllocationAccess for Buffer
impl AllocationAccess for Buffer
fn memory_allocation_mut(&mut self) -> &mut MemoryAllocation
fn write_into_bytes<T>(
&mut self,
write_data: T,
allocation_offset: usize,
) -> Result<(), MemoryError>where
T: NoUninit,
fn write_slice<T>(
&mut self,
write_data: &[T],
allocation_offset: usize,
) -> Result<(), MemoryError>where
T: NoUninit,
fn write_bytes( &mut self, write_bytes: &[u8], allocation_offset: usize, ) -> Result<(), MemoryError>
fn write_struct<T>( &mut self, write_data: T, allocation_offset: usize, ) -> Result<(), MemoryError>
fn write_iter<I, T>( &mut self, write_data: I, allocation_offset: usize, ) -> Result<(), MemoryError>
fn read_vec<T>(
&mut self,
element_count: usize,
allocation_offset: usize,
) -> Result<Vec<T>, MemoryError>where
T: Pod,
fn read_struct<T>(&mut self, allocation_offset: usize) -> Result<T, MemoryError>
Source§impl DeviceOwned for Buffer
impl DeviceOwned for Buffer
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