pub enum MemoryAllocatePreference {
Unknown,
NeverAllocate,
AlwaysAllocate,
}Expand description
Describes whether allocating DeviceMemory is desired.
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 duplicate 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 for MemoryAllocatePreference
impl PartialEq for MemoryAllocatePreference
impl Copy for MemoryAllocatePreference
impl Eq for MemoryAllocatePreference
impl StructuralPartialEq for MemoryAllocatePreference
Auto Trait Implementations§
impl Freeze for MemoryAllocatePreference
impl RefUnwindSafe for MemoryAllocatePreference
impl Send for MemoryAllocatePreference
impl Sync for MemoryAllocatePreference
impl Unpin for MemoryAllocatePreference
impl UnwindSafe for MemoryAllocatePreference
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