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)>
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.
source§impl PartialEq for MapError
impl PartialEq for MapError
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