pub struct SurfaceCapabilities {
    pub image_count: RangeInclusive<SwapImageIndex>,
    pub current_extent: Option<Extent2D>,
    pub extents: RangeInclusive<Extent2D>,
    pub max_image_layers: Layer,
    pub usage: Usage,
    pub present_modes: PresentMode,
    pub composite_alpha_modes: CompositeAlphaMode,
}
Expand description

Describes information about what a Surface’s properties are. Fetch this with Surface::capabilities.

Fields

image_count: RangeInclusive<SwapImageIndex>

Number of presentable images supported by the adapter for a swapchain created from this surface.

  • image_count.start must be at least 1.
  • image_count.end must be larger or equal to image_count.start.
current_extent: Option<Extent2D>

Current extent of the surface.

None if the surface has no explicit size, depending on the swapchain extent.

extents: RangeInclusive<Extent2D>

Range of supported extents.

current_extent must be inside this range.

max_image_layers: Layer

Maximum number of layers supported for presentable images.

Must be at least 1.

usage: Usage

Supported image usage flags.

present_modes: PresentMode

A bitmask of supported presentation modes.

composite_alpha_modes: CompositeAlphaMode

A bitmask of supported alpha composition modes.

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

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

Performs the conversion.

Performs the conversion.

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

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.