pub struct VertexStateBuilder<'a, CS: State<'a>> { /* private fields */ }Expand description
Builder for wgpu::VertexState
Set all required fields and any optional fields, then call build().
Builder field setters:
- module Required
- entry_point Optional, defaults to
None - compilation_options Optional, defaults to wgpu::PipelineCompilationOptions::default()
- buffers Required
Implementations§
Source§impl<'a> VertexStateBuilder<'a, Empty>
impl<'a> VertexStateBuilder<'a, Empty>
pub fn new() -> VertexStateBuilder<'a, Empty>
Source§impl<'a, CS: State<'a>> VertexStateBuilder<'a, CS>
impl<'a, CS: State<'a>> VertexStateBuilder<'a, CS>
Sourcepub fn module(
self,
module: &'a ShaderModule,
) -> VertexStateBuilder<'a, SetModule<CS>>where
CS::Module: ModuleIsEmpty,
pub fn module(
self,
module: &'a ShaderModule,
) -> VertexStateBuilder<'a, SetModule<CS>>where
CS::Module: ModuleIsEmpty,
Setter for wgpu::VertexState::module. Required.
Sourcepub fn entry_point(
self,
entry_point: &'a str,
) -> VertexStateBuilder<'a, SetEntryPoint<CS>>where
CS::EntryPoint: EntryPointIsEmpty,
pub fn entry_point(
self,
entry_point: &'a str,
) -> VertexStateBuilder<'a, SetEntryPoint<CS>>where
CS::EntryPoint: EntryPointIsEmpty,
Setter for wgpu::VertexState::entry_point. Optional, defaults to None.
Sourcepub fn maybe_entry_point(
self,
entry_point: Option<&'a str>,
) -> VertexStateBuilder<'a, SetEntryPoint<CS>>where
CS::EntryPoint: EntryPointIsEmpty,
pub fn maybe_entry_point(
self,
entry_point: Option<&'a str>,
) -> VertexStateBuilder<'a, SetEntryPoint<CS>>where
CS::EntryPoint: EntryPointIsEmpty,
Setter for wgpu::VertexState::entry_point. Optional, defaults to None.
Sourcepub fn compilation_options(
self,
compilation_options: impl Nested<PipelineCompilationOptions<'a>>,
) -> VertexStateBuilder<'a, SetCompilationOptions<CS>>where
CS::CompilationOptions: CompilationOptionsIsEmpty,
pub fn compilation_options(
self,
compilation_options: impl Nested<PipelineCompilationOptions<'a>>,
) -> VertexStateBuilder<'a, SetCompilationOptions<CS>>where
CS::CompilationOptions: CompilationOptionsIsEmpty,
Setter for wgpu::VertexState::compilation_options. Optional, defaults to wgpu::PipelineCompilationOptions::default().
Sourcepub fn buffers(
self,
buffers: &'a [VertexBufferLayout<'a>],
) -> VertexStateBuilder<'a, SetBuffers<CS>>where
CS::Buffers: BuffersIsEmpty,
pub fn buffers(
self,
buffers: &'a [VertexBufferLayout<'a>],
) -> VertexStateBuilder<'a, SetBuffers<CS>>where
CS::Buffers: BuffersIsEmpty,
Setter for wgpu::VertexState::buffers. Required.
Source§impl<'a, CS: Complete<'a>> VertexStateBuilder<'a, CS>
impl<'a, CS: Complete<'a>> VertexStateBuilder<'a, CS>
pub fn build(self) -> VertexState<'a>
Trait Implementations§
Source§impl<'a, CS: Complete<'a>> Nested<VertexState<'a>> for VertexStateBuilder<'a, CS>
impl<'a, CS: Complete<'a>> Nested<VertexState<'a>> for VertexStateBuilder<'a, CS>
fn unnest(self) -> VertexState<'a>
Auto Trait Implementations§
impl<'a, CS> Freeze for VertexStateBuilder<'a, CS>
impl<'a, CS> RefUnwindSafe for VertexStateBuilder<'a, CS>where
<CS as State<'a>>::Module: RefUnwindSafe,
<CS as State<'a>>::EntryPoint: RefUnwindSafe,
<CS as State<'a>>::CompilationOptions: RefUnwindSafe,
<CS as State<'a>>::Buffers: RefUnwindSafe,
impl<'a, CS> Send for VertexStateBuilder<'a, CS>
impl<'a, CS> Sync for VertexStateBuilder<'a, CS>
impl<'a, CS> Unpin for VertexStateBuilder<'a, CS>
impl<'a, CS> UnwindSafe for VertexStateBuilder<'a, CS>where
<CS as State<'a>>::Module: UnwindSafe,
<CS as State<'a>>::EntryPoint: UnwindSafe,
<CS as State<'a>>::CompilationOptions: UnwindSafe,
<CS as State<'a>>::Buffers: UnwindSafe,
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