logo
pub enum SwapchainCreationError {
Show 18 variants OomError(OomError), DeviceLost, SurfaceLost, SurfaceInUse, NativeWindowInUse, ExtensionNotEnabled { extension: &'static str, reason: &'static str, }, CompositeAlphaNotSupported { provided: CompositeAlpha, supported: SupportedCompositeAlpha, }, FormatColorSpaceNotSupported, ImageArrayLayersNotSupported { provided: u32, max_supported: u32, }, ImageExtentNotSupported { provided: [u32; 2], min_supported: [u32; 2], max_supported: [u32; 2], }, ImageFormatPropertiesNotSupported, ImageSharingInvalidQueueFamilyId { id: u32, }, ImageUsageNotSupported { provided: ImageUsage, supported: ImageUsage, }, MinImageCountNotSupported { provided: u32, min_supported: u32, max_supported: Option<u32>, }, PresentModeNotSupported, PreTransformNotSupported { provided: SurfaceTransform, supported: SupportedSurfaceTransforms, }, SwapchainAlreadyRetired, Win32MonitorInvalid,
}
Expand description

Error that can happen when creating a Swapchain.

Variants

OomError(OomError)

Not enough memory.

DeviceLost

The device was lost.

SurfaceLost

The surface was lost.

SurfaceInUse

The surface is already used by another swapchain.

NativeWindowInUse

The window is already in use by another API.

ExtensionNotEnabled

Fields

extension: &'static str
reason: &'static str

CompositeAlphaNotSupported

Fields

provided: CompositeAlpha

The provided composite_alpha is not supported by the surface for this device.

FormatColorSpaceNotSupported

The provided format and color_space are not supported by the surface for this device.

ImageArrayLayersNotSupported

Fields

provided: u32
max_supported: u32

The provided image_array_layers is greater than what is supported by the surface for this device.

ImageExtentNotSupported

Fields

provided: [u32; 2]
min_supported: [u32; 2]
max_supported: [u32; 2]

The provided image_extent is not within the range supported by the surface for this device.

ImageFormatPropertiesNotSupported

The provided image parameters are not supported as queried from image_format_properties.

ImageSharingInvalidQueueFamilyId

Fields

id: u32

The provided image_sharing was set to Concurrent, but one of the specified queue family ids was not valid.

ImageUsageNotSupported

Fields

provided: ImageUsage
supported: ImageUsage

The provided image_usage has fields set that are not supported by the surface for this device.

MinImageCountNotSupported

Fields

provided: u32
min_supported: u32
max_supported: Option<u32>

The provided min_image_count is not within the range supported by the surface for this device.

PresentModeNotSupported

The provided present_mode is not supported by the surface for this device.

PreTransformNotSupported

Fields

provided: SurfaceTransform

The provided pre_transform is not supported by the surface for this device.

SwapchainAlreadyRetired

The swapchain has already been used to create a new one.

Win32MonitorInvalid

The win32_monitor value was Some when it must be None or vice-versa.

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.

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.