Struct gpu_allocator::vulkan::MappedAllocationSlab
source · pub struct MappedAllocationSlab<'a> { /* private fields */ }
Expand description
A wrapper struct over a borrowed Allocation
that infallibly implements presser::Slab
.
This type should be acquired by calling Allocation::try_as_mapped_slab
.
Trait Implementations§
source§impl<'a> Slab for MappedAllocationSlab<'a>
impl<'a> Slab for MappedAllocationSlab<'a>
source§fn base_ptr(&self) -> *const u8
fn base_ptr(&self) -> *const u8
Get a pointer to the beginning of the allocation represented by
self
.source§fn base_ptr_mut(&mut self) -> *mut u8
fn base_ptr_mut(&mut self) -> *mut u8
Get a pointer to the beginning of the allocation represented by
self
.source§fn as_maybe_uninit_bytes(&self) -> &[MaybeUninit<u8>]
fn as_maybe_uninit_bytes(&self) -> &[MaybeUninit<u8>]
Interpret a portion of
self
as a slice of MaybeUninit<u8>
. This is likely not
incredibly useful, you probably want to use Slab::as_maybe_uninit_bytes_mut
source§fn as_maybe_uninit_bytes_mut(&mut self) -> &mut [MaybeUninit<u8>]
fn as_maybe_uninit_bytes_mut(&mut self) -> &mut [MaybeUninit<u8>]
Interpret a portion of
self
as a mutable slice of MaybeUninit<u8>
.source§unsafe fn assume_initialized_as_bytes(&self) -> &[u8] ⓘ
unsafe fn assume_initialized_as_bytes(&self) -> &[u8] ⓘ
source§unsafe fn assume_initialized_as_bytes_mut(&mut self) -> &mut [u8] ⓘ
unsafe fn assume_initialized_as_bytes_mut(&mut self) -> &mut [u8] ⓘ
Interpret
self
as a mutable byte slice. This assumes that all bytes
in self
are initialized. Read moresource§unsafe fn assume_range_initialized_as_bytes<R>(&self, range: R) -> &[u8] ⓘ
unsafe fn assume_range_initialized_as_bytes<R>(&self, range: R) -> &[u8] ⓘ
Interpret a range of
self
as a byte slice. This assumes that all bytes
within range
are initialized. Read moreAuto Trait Implementations§
impl<'a> Freeze for MappedAllocationSlab<'a>
impl<'a> RefUnwindSafe for MappedAllocationSlab<'a>
impl<'a> !Send for MappedAllocationSlab<'a>
impl<'a> !Sync for MappedAllocationSlab<'a>
impl<'a> Unpin for MappedAllocationSlab<'a>
impl<'a> !UnwindSafe for MappedAllocationSlab<'a>
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