pub struct TextureViewDescriptorBuilder<'a, CS: State<'a>> { /* private fields */ }Expand description
Builder for wgpu::TextureViewDescriptor
Set all required fields and any optional fields, then call build().
Builder field setters:
- format Optional, defaults to
None - dimension Optional, defaults to
None - usage Optional, defaults to
None - aspect Optional, defaults to wgpu::TextureAspect::All
- base_mip_level Optional, defaults to
0u32 - mip_level_count Optional, defaults to
None - base_array_layer Optional, defaults to
0u32 - array_layer_count Optional, defaults to
None
Implementations§
Source§impl<'a> TextureViewDescriptorBuilder<'a, Empty>
impl<'a> TextureViewDescriptorBuilder<'a, Empty>
pub fn new() -> TextureViewDescriptorBuilder<'a, Empty>
Source§impl<'a, CS: State<'a>> TextureViewDescriptorBuilder<'a, CS>
impl<'a, CS: State<'a>> TextureViewDescriptorBuilder<'a, CS>
Sourcepub fn label(
self,
label: Label<'a>,
) -> TextureViewDescriptorBuilder<'a, SetLabel<CS>>where
CS::Label: LabelIsEmpty,
pub fn label(
self,
label: Label<'a>,
) -> TextureViewDescriptorBuilder<'a, SetLabel<CS>>where
CS::Label: LabelIsEmpty,
Setter for wgpu::TextureViewDescriptor::label. Optional, defaults to None.
Sourcepub fn format(
self,
format: TextureFormat,
) -> TextureViewDescriptorBuilder<'a, SetFormat<CS>>where
CS::Format: FormatIsEmpty,
pub fn format(
self,
format: TextureFormat,
) -> TextureViewDescriptorBuilder<'a, SetFormat<CS>>where
CS::Format: FormatIsEmpty,
Setter for wgpu::TextureViewDescriptor::format. Optional, defaults to None.
Sourcepub fn maybe_format(
self,
format: Option<TextureFormat>,
) -> TextureViewDescriptorBuilder<'a, SetFormat<CS>>where
CS::Format: FormatIsEmpty,
pub fn maybe_format(
self,
format: Option<TextureFormat>,
) -> TextureViewDescriptorBuilder<'a, SetFormat<CS>>where
CS::Format: FormatIsEmpty,
Setter for wgpu::TextureViewDescriptor::format. Optional, defaults to None.
Sourcepub fn dimension(
self,
dimension: TextureViewDimension,
) -> TextureViewDescriptorBuilder<'a, SetDimension<CS>>where
CS::Dimension: DimensionIsEmpty,
pub fn dimension(
self,
dimension: TextureViewDimension,
) -> TextureViewDescriptorBuilder<'a, SetDimension<CS>>where
CS::Dimension: DimensionIsEmpty,
Setter for wgpu::TextureViewDescriptor::dimension. Optional, defaults to None.
Sourcepub fn maybe_dimension(
self,
dimension: Option<TextureViewDimension>,
) -> TextureViewDescriptorBuilder<'a, SetDimension<CS>>where
CS::Dimension: DimensionIsEmpty,
pub fn maybe_dimension(
self,
dimension: Option<TextureViewDimension>,
) -> TextureViewDescriptorBuilder<'a, SetDimension<CS>>where
CS::Dimension: DimensionIsEmpty,
Setter for wgpu::TextureViewDescriptor::dimension. Optional, defaults to None.
Sourcepub fn usage(
self,
usage: TextureUsages,
) -> TextureViewDescriptorBuilder<'a, SetUsage<CS>>where
CS::Usage: UsageIsEmpty,
pub fn usage(
self,
usage: TextureUsages,
) -> TextureViewDescriptorBuilder<'a, SetUsage<CS>>where
CS::Usage: UsageIsEmpty,
Setter for wgpu::TextureViewDescriptor::usage. Optional, defaults to None.
Sourcepub fn maybe_usage(
self,
usage: Option<TextureUsages>,
) -> TextureViewDescriptorBuilder<'a, SetUsage<CS>>where
CS::Usage: UsageIsEmpty,
pub fn maybe_usage(
self,
usage: Option<TextureUsages>,
) -> TextureViewDescriptorBuilder<'a, SetUsage<CS>>where
CS::Usage: UsageIsEmpty,
Setter for wgpu::TextureViewDescriptor::usage. Optional, defaults to None.
Sourcepub fn aspect(
self,
aspect: TextureAspect,
) -> TextureViewDescriptorBuilder<'a, SetAspect<CS>>where
CS::Aspect: AspectIsEmpty,
pub fn aspect(
self,
aspect: TextureAspect,
) -> TextureViewDescriptorBuilder<'a, SetAspect<CS>>where
CS::Aspect: AspectIsEmpty,
Setter for wgpu::TextureViewDescriptor::aspect. Optional, defaults to wgpu::TextureAspect::All.
Sourcepub fn base_mip_level(
self,
base_mip_level: u32,
) -> TextureViewDescriptorBuilder<'a, SetBaseMipLevel<CS>>where
CS::BaseMipLevel: BaseMipLevelIsEmpty,
pub fn base_mip_level(
self,
base_mip_level: u32,
) -> TextureViewDescriptorBuilder<'a, SetBaseMipLevel<CS>>where
CS::BaseMipLevel: BaseMipLevelIsEmpty,
Setter for wgpu::TextureViewDescriptor::base_mip_level. Optional, defaults to 0u32.
Sourcepub fn mip_level_count(
self,
mip_level_count: u32,
) -> TextureViewDescriptorBuilder<'a, SetMipLevelCount<CS>>where
CS::MipLevelCount: MipLevelCountIsEmpty,
pub fn mip_level_count(
self,
mip_level_count: u32,
) -> TextureViewDescriptorBuilder<'a, SetMipLevelCount<CS>>where
CS::MipLevelCount: MipLevelCountIsEmpty,
Setter for wgpu::TextureViewDescriptor::mip_level_count. Optional, defaults to None.
Sourcepub fn maybe_mip_level_count(
self,
mip_level_count: Option<u32>,
) -> TextureViewDescriptorBuilder<'a, SetMipLevelCount<CS>>where
CS::MipLevelCount: MipLevelCountIsEmpty,
pub fn maybe_mip_level_count(
self,
mip_level_count: Option<u32>,
) -> TextureViewDescriptorBuilder<'a, SetMipLevelCount<CS>>where
CS::MipLevelCount: MipLevelCountIsEmpty,
Setter for wgpu::TextureViewDescriptor::mip_level_count. Optional, defaults to None.
Sourcepub fn base_array_layer(
self,
base_array_layer: u32,
) -> TextureViewDescriptorBuilder<'a, SetBaseArrayLayer<CS>>where
CS::BaseArrayLayer: BaseArrayLayerIsEmpty,
pub fn base_array_layer(
self,
base_array_layer: u32,
) -> TextureViewDescriptorBuilder<'a, SetBaseArrayLayer<CS>>where
CS::BaseArrayLayer: BaseArrayLayerIsEmpty,
Setter for wgpu::TextureViewDescriptor::base_array_layer. Optional, defaults to 0u32.
Sourcepub fn array_layer_count(
self,
array_layer_count: u32,
) -> TextureViewDescriptorBuilder<'a, SetArrayLayerCount<CS>>where
CS::ArrayLayerCount: ArrayLayerCountIsEmpty,
pub fn array_layer_count(
self,
array_layer_count: u32,
) -> TextureViewDescriptorBuilder<'a, SetArrayLayerCount<CS>>where
CS::ArrayLayerCount: ArrayLayerCountIsEmpty,
Setter for wgpu::TextureViewDescriptor::array_layer_count. Optional, defaults to None.
Sourcepub fn maybe_array_layer_count(
self,
array_layer_count: Option<u32>,
) -> TextureViewDescriptorBuilder<'a, SetArrayLayerCount<CS>>where
CS::ArrayLayerCount: ArrayLayerCountIsEmpty,
pub fn maybe_array_layer_count(
self,
array_layer_count: Option<u32>,
) -> TextureViewDescriptorBuilder<'a, SetArrayLayerCount<CS>>where
CS::ArrayLayerCount: ArrayLayerCountIsEmpty,
Setter for wgpu::TextureViewDescriptor::array_layer_count. Optional, defaults to None.