pub enum MapError {
OutOfDeviceMemory,
OutOfHostMemory,
NonHostVisible,
MapFailed,
AlreadyMapped,
}
Expand description
Enumeration of possible errors that may occur during memory mapping.
Variants§
OutOfDeviceMemory
Backend reported that device memory has been exhausted.
Deallocating device memory from the same heap may increase chance
that another mapping would succeed.
OutOfHostMemory
Backend reported that host memory has been exhausted.
Deallocating host memory may increase chance that another mapping would succeed.
NonHostVisible
Attempt to map memory block with non-host-visible memory type.
Ensure to include UsageFlags::HOST_ACCESS
into allocation request
when memory mapping is intended.
MapFailed
Map failed for implementation specific reason.
For Vulkan backend this includes failed attempt
to allocate large enough virtual address space.
AlreadyMapped
Mapping failed due to block being already mapped.
Trait Implementations§
Source§impl Error for MapError
impl Error for MapError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<DeviceMapError> for MapError
impl From<DeviceMapError> for MapError
Source§fn from(err: DeviceMapError) -> Self
fn from(err: DeviceMapError) -> Self
Converts to this type from the input type.
Source§impl From<OutOfMemory> for MapError
impl From<OutOfMemory> for MapError
Source§fn from(err: OutOfMemory) -> Self
fn from(err: OutOfMemory) -> Self
Converts to this type from the input type.
impl Copy for MapError
impl Eq for MapError
impl StructuralPartialEq for MapError
Auto Trait Implementations§
impl Freeze for MapError
impl RefUnwindSafe for MapError
impl Send for MapError
impl Sync for MapError
impl Unpin for MapError
impl UnwindSafe for MapError
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
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)