pub enum PotentialDedicatedAllocation<A> {
Generic(A),
Dedicated(DeviceMemory),
DedicatedMapped(MappedDeviceMemory),
}
Expand description
Enumeration that can contain either a generic allocation coming from a pool, or a dedicated allocation for one specific resource.
Variants
Generic(A)
Dedicated(DeviceMemory)
DedicatedMapped(MappedDeviceMemory)
Trait Implementations
sourceimpl<A: Debug> Debug for PotentialDedicatedAllocation<A>
impl<A: Debug> Debug for PotentialDedicatedAllocation<A>
sourceimpl<A> From<A> for PotentialDedicatedAllocation<A>
impl<A> From<A> for PotentialDedicatedAllocation<A>
sourcefn from(alloc: A) -> PotentialDedicatedAllocation<A>
fn from(alloc: A) -> PotentialDedicatedAllocation<A>
Performs the conversion.
sourceimpl<A> MemoryPoolAlloc for PotentialDedicatedAllocation<A> where
A: MemoryPoolAlloc,
impl<A> MemoryPoolAlloc for PotentialDedicatedAllocation<A> where
A: MemoryPoolAlloc,
sourcefn mapped_memory(&self) -> Option<&MappedDeviceMemory>
fn mapped_memory(&self) -> Option<&MappedDeviceMemory>
Returns the memory object from which this is allocated. Returns None
if the memory is
not mapped. Read more
sourcefn memory(&self) -> &DeviceMemory
fn memory(&self) -> &DeviceMemory
Returns the memory object from which this is allocated.
sourcefn offset(&self) -> DeviceSize
fn offset(&self) -> DeviceSize
Returns the offset at the start of the memory where the first byte of this allocation resides. Read more
Auto Trait Implementations
impl<A> RefUnwindSafe for PotentialDedicatedAllocation<A> where
A: RefUnwindSafe,
impl<A> Send for PotentialDedicatedAllocation<A> where
A: Send,
impl<A> Sync for PotentialDedicatedAllocation<A> where
A: Sync,
impl<A> Unpin for PotentialDedicatedAllocation<A> where
A: Unpin,
impl<A> UnwindSafe for PotentialDedicatedAllocation<A> where
A: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more