pub trait Query {
type Dimensions: Dimensions;
type Component: Component;
// Required method
fn base_dimensions(&self) -> Self::Dimensions;
// Provided methods
fn array_layers(&self) -> NonZeroU32 { ... }
fn mip_levels(&self) -> NonZeroU32 { ... }
fn samples(&self) -> NonZeroU32 { ... }
}Expand description
Required Associated Types§
Sourcetype Dimensions: Dimensions
type Dimensions: Dimensions
Type of the dimensions of the texture.
Should be a Scalar, Vec2, or Vec3 of NonZeroU32.
Required Methods§
Sourcefn base_dimensions(&self) -> Self::Dimensions
fn base_dimensions(&self) -> Self::Dimensions
Returns the dimensions of mip level 0 of the texture.
Provided Methods§
Sourcefn array_layers(&self) -> NonZeroU32
fn array_layers(&self) -> NonZeroU32
Returns the count of array layers of the texture.
For non-array textures, returns 1.
Sourcefn mip_levels(&self) -> NonZeroU32
fn mip_levels(&self) -> NonZeroU32
Returns the count of mip levels of the texture.
Sourcefn samples(&self) -> NonZeroU32
fn samples(&self) -> NonZeroU32
Returns the count of samples of the texture.
For non-multisampled textures, returns 1.