pub enum ImageViewCreationError {
Show 24 variants OomError(OomError), RequirementNotMet { required_for: &'static str, requires_one_of: RequiresOneOf, }, Array2dCompatibleMultipleMipLevels, ArrayLayersOutOfRange { range_end: u32, max: u32, }, BlockTexelViewCompatibleMultipleArrayLayers, BlockTexelViewCompatibleMultipleMipLevels, FormatChromaSubsamplingInvalidImageDimensions, FormatNotCompatible, FormatNotSupported, FormatRequiresSamplerYcbcrConversion { format: Format, }, FormatUsageNotSupported { usage: &'static str, }, ImageAspectsNotCompatible { aspects: ImageAspects, image_aspects: ImageAspects, }, ImageMissingUsage, ImageNotArray2dCompatible, ImageNotCubeCompatible, ImageTypeNotCompatible, IncompatibleType, MipLevelsOutOfRange { range_end: u32, max: u32, }, MultisamplingNot2d, SamplerYcbcrConversionComponentMappingNotIdentity { component_mapping: ComponentMapping, }, TypeCubeArrayNotMultipleOf6ArrayLayers, TypeCubeNot6ArrayLayers, TypeNonArrayedMultipleArrayLayers, UsageNotSupportedByImage { usage: ImageUsage, supported_usage: ImageUsage, },
}
Expand description

Error that can happen when creating an image view.

Variants

OomError(OomError)

Allocating memory failed.

RequirementNotMet

Fields

required_for: &'static str
requires_one_of: RequiresOneOf

Array2dCompatibleMultipleMipLevels

A 2D image view was requested from a 3D image, but a range of multiple mip levels was specified.

ArrayLayersOutOfRange

Fields

range_end: u32
max: u32

The specified range of array layers was not a subset of those in the image.

BlockTexelViewCompatibleMultipleArrayLayers

The image has the block_texel_view_compatible flag, but a range of multiple array layers was specified.

BlockTexelViewCompatibleMultipleMipLevels

The image has the block_texel_view_compatible flag, but a range of multiple mip levels was specified.

FormatChromaSubsamplingInvalidImageDimensions

The requested format has chroma subsampling, but the width and/or height of the image was not a multiple of 2.

FormatNotCompatible

The requested format was not compatible with the image.

FormatNotSupported

The given format was not supported by the device.

FormatRequiresSamplerYcbcrConversion

Fields

format: Format

The format requires a sampler YCbCr conversion, but none was provided.

FormatUsageNotSupported

Fields

usage: &'static str

A requested usage flag was not supported by the given format.

ImageAspectsNotCompatible

Fields

aspects: ImageAspects
image_aspects: ImageAspects

An aspect was selected that was not present in the image.

ImageMissingUsage

The image was not created with one of the required usages for image views.

ImageNotArray2dCompatible

A 2D image view was requested from a 3D image, but the image was not created with the array_2d_compatible flag.

ImageNotCubeCompatible

A cube image view type was requested, but the image was not created with the cube_compatible flag.

ImageTypeNotCompatible

The given image view type was not compatible with the type of the image.

IncompatibleType

The requested ImageViewType was not compatible with the image, or with the specified ranges of array layers and mipmap levels.

MipLevelsOutOfRange

Fields

range_end: u32
max: u32

The specified range of mip levels was not a subset of those in the image.

MultisamplingNot2d

The image has multisampling enabled, but the image view type was not Dim2d or Dim2dArray.

SamplerYcbcrConversionComponentMappingNotIdentity

Fields

component_mapping: ComponentMapping

Sampler YCbCr conversion was enabled, but component_mapping was not the identity mapping.

TypeCubeArrayNotMultipleOf6ArrayLayers

The CubeArray image view type was specified, but the range of array layers did not have a size that is a multiple 6.

TypeCubeNot6ArrayLayers

The Cube image view type was specified, but the range of array layers did not have a size of 6.

TypeNonArrayedMultipleArrayLayers

A non-arrayed image view type was specified, but a range of multiple array layers was specified.

UsageNotSupportedByImage

Fields

usage: ImageUsage
supported_usage: ImageUsage

The provided usage is not supported by the parent image.

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.
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.