Enum vulkano::memory::allocator::MemoryAllocatePreference
source · #[non_exhaustive]
pub enum MemoryAllocatePreference {
Unknown,
NeverAllocate,
AlwaysAllocate,
}
Expand description
Describes whether allocating DeviceMemory
is desired.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unknown
There is no known preference, let the allocator decide.
NeverAllocate
The allocator should never allocate DeviceMemory
and should instead only suballocate from
existing blocks.
This option is best suited if you can not afford the overhead of allocating DeviceMemory
.
AlwaysAllocate
The allocator should always allocate DeviceMemory
.
This option is best suited if you are allocating a long-lived resource that you know could benefit from having a dedicated allocation.
Trait Implementations§
source§impl Clone for MemoryAllocatePreference
impl Clone for MemoryAllocatePreference
source§fn clone(&self) -> MemoryAllocatePreference
fn clone(&self) -> MemoryAllocatePreference
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MemoryAllocatePreference
impl Debug for MemoryAllocatePreference
source§impl Hash for MemoryAllocatePreference
impl Hash for MemoryAllocatePreference
source§impl PartialEq<MemoryAllocatePreference> for MemoryAllocatePreference
impl PartialEq<MemoryAllocatePreference> for MemoryAllocatePreference
source§fn eq(&self, other: &MemoryAllocatePreference) -> bool
fn eq(&self, other: &MemoryAllocatePreference) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.