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
Array2dCompatibleMultipleMipLevels
A 2D image view was requested from a 3D image, but a range of multiple mip levels was specified.
ArrayLayersOutOfRange
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
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
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
sourceimpl Clone for ImageViewCreationError
impl Clone for ImageViewCreationError
sourcefn clone(&self) -> ImageViewCreationError
fn clone(&self) -> ImageViewCreationError
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 ImageViewCreationError
impl Debug for ImageViewCreationError
sourceimpl Display for ImageViewCreationError
impl Display for ImageViewCreationError
sourceimpl Error for ImageViewCreationError
impl Error for ImageViewCreationError
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<OomError> for ImageViewCreationError
impl From<OomError> for ImageViewCreationError
sourcefn from(err: OomError) -> ImageViewCreationError
fn from(err: OomError) -> ImageViewCreationError
Performs the conversion.
sourceimpl PartialEq<ImageViewCreationError> for ImageViewCreationError
impl PartialEq<ImageViewCreationError> for ImageViewCreationError
sourcefn eq(&self, other: &ImageViewCreationError) -> bool
fn eq(&self, other: &ImageViewCreationError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ImageViewCreationError) -> bool
fn ne(&self, other: &ImageViewCreationError) -> bool
This method tests for !=
.
impl Eq for ImageViewCreationError
impl StructuralEq for ImageViewCreationError
impl StructuralPartialEq for ImageViewCreationError
Auto Trait Implementations
impl RefUnwindSafe for ImageViewCreationError
impl Send for ImageViewCreationError
impl Sync for ImageViewCreationError
impl Unpin for ImageViewCreationError
impl UnwindSafe for ImageViewCreationError
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