pub enum BufferError {
Show 17 variants VulkanError(VulkanError), AllocError(AllocationCreationError), RequirementNotMet { required_for: &'static str, requires_one_of: RequiresOneOf, }, DedicatedAllocationMismatch, DedicatedAllocationRequired, InUseByHost, InUseByDevice, MaxBufferSizeExceeded { size: DeviceSize, max: DeviceSize, }, MemoryAllocationNotAligned { allocation_offset: DeviceSize, required_alignment: DeviceSize, }, MemoryAllocationTooSmall { allocation_size: DeviceSize, required_size: DeviceSize, }, MemoryBufferDeviceAddressNotSupported, MemoryExternalHandleTypesDisjoint { buffer_handle_types: ExternalMemoryHandleTypes, memory_export_handle_types: ExternalMemoryHandleTypes, }, MemoryImportedHandleTypeNotEnabled { buffer_handle_types: ExternalMemoryHandleTypes, memory_imported_handle_type: ExternalMemoryHandleType, }, MemoryNotHostVisible, MemoryProtectedMismatch { buffer_protected: bool, memory_protected: bool, }, MemoryTypeNotAllowed { provided_memory_type_index: u32, allowed_memory_type_bits: u32, }, SharingQueueFamilyIndexOutOfRange { queue_family_index: u32, queue_family_count: u32, },
}
Expand description

Error that can happen in buffer functions.

Variants

VulkanError(VulkanError)

AllocError(AllocationCreationError)

Allocating memory failed.

RequirementNotMet

Fields

required_for: &'static str
requires_one_of: RequiresOneOf

DedicatedAllocationMismatch

The memory was created dedicated to a resource, but not to this buffer.

DedicatedAllocationRequired

A dedicated allocation is required for this buffer, but one was not provided.

InUseByHost

The host is already using this buffer in a way that is incompatible with the requested access.

InUseByDevice

The device is already using this buffer in a way that is incompatible with the requested access.

MaxBufferSizeExceeded

Fields

size: DeviceSize

The specified size exceeded the value of the max_buffer_size limit.

MemoryAllocationNotAligned

Fields

allocation_offset: DeviceSize
required_alignment: DeviceSize

The offset of the allocation does not have the required alignment.

MemoryAllocationTooSmall

Fields

allocation_size: DeviceSize
required_size: DeviceSize

The size of the allocation is smaller than what is required.

MemoryBufferDeviceAddressNotSupported

The buffer was created with the shader_device_address usage, but the memory does not support this usage.

MemoryExternalHandleTypesDisjoint

Fields

buffer_handle_types: ExternalMemoryHandleTypes
memory_export_handle_types: ExternalMemoryHandleTypes

The memory was created with export handle types, but none of these handle types were enabled on the buffer.

MemoryImportedHandleTypeNotEnabled

Fields

buffer_handle_types: ExternalMemoryHandleTypes
memory_imported_handle_type: ExternalMemoryHandleType

The memory was created with an import, but the import’s handle type was not enabled on the buffer.

MemoryNotHostVisible

The memory backing this buffer is not visible to the host.

MemoryProtectedMismatch

Fields

buffer_protected: bool
memory_protected: bool

The protection of buffer and memory are not equal.

MemoryTypeNotAllowed

Fields

provided_memory_type_index: u32
allowed_memory_type_bits: u32

The provided memory type is not one of the allowed memory types that can be bound to this buffer.

SharingQueueFamilyIndexOutOfRange

Fields

queue_family_index: u32
queue_family_count: u32

The sharing mode was set to Concurrent, but one of the specified queue family indices was out of range.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.