logo
pub enum ImageViewCreationError {
Show 24 variants OomError(OomError), FeatureNotEnabled { feature: &'static str, reason: &'static str, }, Array2dCompatibleMultipleMipLevels, ArrayLayersOutOfRange { range_end: u32, max: u32, }, BlockTexelViewCompatibleMultipleArrayLayers, BlockTexelViewCompatibleMultipleMipLevels, BlockTexelViewCompatibleUncompressedIs3d, 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,
}
Expand description

Error that can happen when creating an image view.

Variants

OomError(OomError)

Allocating memory failed.

FeatureNotEnabled

Fields

feature: &'static str
reason: &'static str

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.

BlockTexelViewCompatibleUncompressedIs3d

The image has the block_texel_view_compatible flag, and an uncompressed format was requested, and the image view type was Dim3d.

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.

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

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. 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

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.