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
)