pub struct ComputePassDescriptorBuilder<'a, CS: State<'a>> { /* private fields */ }Expand description
Builder for wgpu::ComputePassDescriptor
Set all required fields and any optional fields, then call build().
Builder field setters:
- timestamp_writes Optional, defaults to
None
Implementations§
Source§impl<'a> ComputePassDescriptorBuilder<'a, Empty>
impl<'a> ComputePassDescriptorBuilder<'a, Empty>
pub fn new() -> ComputePassDescriptorBuilder<'a, Empty>
Source§impl<'a, CS: State<'a>> ComputePassDescriptorBuilder<'a, CS>
impl<'a, CS: State<'a>> ComputePassDescriptorBuilder<'a, CS>
Sourcepub fn label(
self,
label: Label<'a>,
) -> ComputePassDescriptorBuilder<'a, SetLabel<CS>>where
CS::Label: LabelIsEmpty,
pub fn label(
self,
label: Label<'a>,
) -> ComputePassDescriptorBuilder<'a, SetLabel<CS>>where
CS::Label: LabelIsEmpty,
Setter for wgpu::ComputePassDescriptor::label. Optional, defaults to None.
Sourcepub fn timestamp_writes(
self,
timestamp_writes: impl Nested<ComputePassTimestampWrites<'a>>,
) -> ComputePassDescriptorBuilder<'a, SetTimestampWrites<CS>>where
CS::TimestampWrites: TimestampWritesIsEmpty,
pub fn timestamp_writes(
self,
timestamp_writes: impl Nested<ComputePassTimestampWrites<'a>>,
) -> ComputePassDescriptorBuilder<'a, SetTimestampWrites<CS>>where
CS::TimestampWrites: TimestampWritesIsEmpty,
Setter for wgpu::ComputePassDescriptor::timestamp_writes. Optional, defaults to None.
Sourcepub fn maybe_timestamp_writes(
self,
timestamp_writes: impl Nested<Option<ComputePassTimestampWrites<'a>>>,
) -> ComputePassDescriptorBuilder<'a, SetTimestampWrites<CS>>where
CS::TimestampWrites: TimestampWritesIsEmpty,
pub fn maybe_timestamp_writes(
self,
timestamp_writes: impl Nested<Option<ComputePassTimestampWrites<'a>>>,
) -> ComputePassDescriptorBuilder<'a, SetTimestampWrites<CS>>where
CS::TimestampWrites: TimestampWritesIsEmpty,
Setter for wgpu::ComputePassDescriptor::timestamp_writes. Optional, defaults to None.
Source§impl<'a, CS: Complete<'a>> ComputePassDescriptorBuilder<'a, CS>
impl<'a, CS: Complete<'a>> ComputePassDescriptorBuilder<'a, CS>
pub fn build(self) -> ComputePassDescriptor<'a>
Trait Implementations§
Source§impl<'a, CS: Complete<'a>> Nested<ComputePassDescriptor<'a>> for ComputePassDescriptorBuilder<'a, CS>
impl<'a, CS: Complete<'a>> Nested<ComputePassDescriptor<'a>> for ComputePassDescriptorBuilder<'a, CS>
fn unnest(self) -> ComputePassDescriptor<'a>
Auto Trait Implementations§
impl<'a, CS> Freeze for ComputePassDescriptorBuilder<'a, CS>
impl<'a, CS> RefUnwindSafe for ComputePassDescriptorBuilder<'a, CS>
impl<'a, CS> Send for ComputePassDescriptorBuilder<'a, CS>
impl<'a, CS> Sync for ComputePassDescriptorBuilder<'a, CS>
impl<'a, CS> Unpin for ComputePassDescriptorBuilder<'a, CS>
impl<'a, CS> UnwindSafe for ComputePassDescriptorBuilder<'a, CS>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more