pub enum DeviceMemoryAllocationError {
OomError(OomError),
TooManyObjects,
MemoryMapError(MemoryMapError),
ExtensionNotEnabled {
extension: &'static str,
reason: &'static str,
},
FeatureNotEnabled {
feature: &'static str,
reason: &'static str,
},
DedicatedAllocationSizeMismatch {
allocation_size: DeviceSize,
required_size: DeviceSize,
},
ImportFdHandleTypeNotSupported {
handle_type: ExternalMemoryHandleType,
},
MemoryTypeHeapSizeExceeded {
allocation_size: DeviceSize,
heap_size: DeviceSize,
},
MemoryTypeIndexOutOfRange {
memory_type_index: u32,
memory_type_count: u32,
},
SpecViolation(u32),
ImplicitSpecViolation(&'static str),
}
Expand description
Error type returned by functions related to DeviceMemory
.
Variants
OomError(OomError)
Not enough memory available.
TooManyObjects
The maximum number of allocations has been exceeded.
MemoryMapError(MemoryMapError)
An error occurred when mapping the memory.
ExtensionNotEnabled
FeatureNotEnabled
DedicatedAllocationSizeMismatch
dedicated_allocation
was Some
, but the provided allocation_size
was different from
the required size of the buffer or image.
ImportFdHandleTypeNotSupported
Fields
handle_type: ExternalMemoryHandleType
The provided MemoryImportInfo::Fd::handle_type
is not supported for file descriptors.
MemoryTypeHeapSizeExceeded
The provided allocation_size
was greater than the memory type’s heap size.
MemoryTypeIndexOutOfRange
The provided memory_type_index
was not less than the number of memory types in the
physical device.
SpecViolation(u32)
Spec violation, containing the Valid Usage ID (VUID) from the Vulkan spec.
ImplicitSpecViolation(&'static str)
An implicit violation that’s convered in the Vulkan spec.
Trait Implementations
sourceimpl Clone for DeviceMemoryAllocationError
impl Clone for DeviceMemoryAllocationError
sourcefn clone(&self) -> DeviceMemoryAllocationError
fn clone(&self) -> DeviceMemoryAllocationError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DeviceMemoryAllocationError
impl Debug for DeviceMemoryAllocationError
sourceimpl Display for DeviceMemoryAllocationError
impl Display for DeviceMemoryAllocationError
sourceimpl Error for DeviceMemoryAllocationError
impl Error for DeviceMemoryAllocationError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<DeviceMemoryAllocationError> for ImageCreationError
impl From<DeviceMemoryAllocationError> for ImageCreationError
sourcefn from(err: DeviceMemoryAllocationError) -> Self
fn from(err: DeviceMemoryAllocationError) -> Self
Performs the conversion.
sourceimpl From<OomError> for DeviceMemoryAllocationError
impl From<OomError> for DeviceMemoryAllocationError
sourceimpl PartialEq<DeviceMemoryAllocationError> for DeviceMemoryAllocationError
impl PartialEq<DeviceMemoryAllocationError> for DeviceMemoryAllocationError
sourcefn eq(&self, other: &DeviceMemoryAllocationError) -> bool
fn eq(&self, other: &DeviceMemoryAllocationError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DeviceMemoryAllocationError) -> bool
fn ne(&self, other: &DeviceMemoryAllocationError) -> bool
This method tests for !=
.
impl Eq for DeviceMemoryAllocationError
impl StructuralEq for DeviceMemoryAllocationError
impl StructuralPartialEq for DeviceMemoryAllocationError
Auto Trait Implementations
impl RefUnwindSafe for DeviceMemoryAllocationError
impl Send for DeviceMemoryAllocationError
impl Sync for DeviceMemoryAllocationError
impl Unpin for DeviceMemoryAllocationError
impl UnwindSafe for DeviceMemoryAllocationError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more