Enum gpu_alloc::error::AllocationError
source · pub enum AllocationError {
OutOfDeviceMemory,
OutOfHostMemory,
NoCompatibleMemoryTypes,
TooManyObjects,
}
Expand description
Enumeration of possible errors that may occur during memory allocation.
Variants§
OutOfDeviceMemory
Backend reported that device memory has been exhausted.
Deallocating device memory from the same heap may increase chance
that another allocation would succeed.
OutOfHostMemory
Backend reported that host memory has been exhausted.
Deallocating host memory may increase chance that another allocation would succeed.
NoCompatibleMemoryTypes
Allocation request cannot be fulfilled as no available memory types allowed
by Request.memory_types
mask is compatible with request.usage
.
TooManyObjects
Reached limit on allocated memory objects count.
Deallocating device memory may increase chance that another allocation would succeed.
Especially dedicated memory blocks.
If this error is returned when memory heaps are far from exhausted
Config
should be tweaked to allocate larger memory objects.
Trait Implementations§
source§impl Clone for AllocationError
impl Clone for AllocationError
source§fn clone(&self) -> AllocationError
fn clone(&self) -> AllocationError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AllocationError
impl Debug for AllocationError
source§impl Display for AllocationError
impl Display for AllocationError
source§impl Error for AllocationError
impl Error for AllocationError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<OutOfMemory> for AllocationError
impl From<OutOfMemory> for AllocationError
source§fn from(err: OutOfMemory) -> Self
fn from(err: OutOfMemory) -> Self
source§impl Hash for AllocationError
impl Hash for AllocationError
source§impl PartialEq for AllocationError
impl PartialEq for AllocationError
impl Copy for AllocationError
impl Eq for AllocationError
impl StructuralPartialEq for AllocationError
Auto Trait Implementations§
impl Freeze for AllocationError
impl RefUnwindSafe for AllocationError
impl Send for AllocationError
impl Sync for AllocationError
impl Unpin for AllocationError
impl UnwindSafe for AllocationError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)