pub struct VertexAttributeBuilder<CS: State> { /* private fields */ }Expand description
Builder for wgpu::VertexAttribute
Set all required fields and any optional fields, then call build().
Builder field setters:
- format Required
- offset Required
- shader_location Required
Implementations§
Source§impl VertexAttributeBuilder<Empty>
impl VertexAttributeBuilder<Empty>
pub fn new() -> VertexAttributeBuilder<Empty>
Source§impl<CS: State> VertexAttributeBuilder<CS>
impl<CS: State> VertexAttributeBuilder<CS>
Sourcepub fn format(
self,
format: VertexFormat,
) -> VertexAttributeBuilder<SetFormat<CS>>where
CS::Format: FormatIsEmpty,
pub fn format(
self,
format: VertexFormat,
) -> VertexAttributeBuilder<SetFormat<CS>>where
CS::Format: FormatIsEmpty,
Setter for wgpu::VertexAttribute::format. Required.
Sourcepub fn offset(
self,
offset: BufferAddress,
) -> VertexAttributeBuilder<SetOffset<CS>>where
CS::Offset: OffsetIsEmpty,
pub fn offset(
self,
offset: BufferAddress,
) -> VertexAttributeBuilder<SetOffset<CS>>where
CS::Offset: OffsetIsEmpty,
Setter for wgpu::VertexAttribute::offset. Required.
Sourcepub fn shader_location(
self,
shader_location: ShaderLocation,
) -> VertexAttributeBuilder<SetShaderLocation<CS>>where
CS::ShaderLocation: ShaderLocationIsEmpty,
pub fn shader_location(
self,
shader_location: ShaderLocation,
) -> VertexAttributeBuilder<SetShaderLocation<CS>>where
CS::ShaderLocation: ShaderLocationIsEmpty,
Setter for wgpu::VertexAttribute::shader_location. Required.
Source§impl<CS: Complete> VertexAttributeBuilder<CS>
impl<CS: Complete> VertexAttributeBuilder<CS>
pub fn build(self) -> VertexAttribute
Trait Implementations§
Source§impl<CS: Complete> Nested<VertexAttribute> for VertexAttributeBuilder<CS>
impl<CS: Complete> Nested<VertexAttribute> for VertexAttributeBuilder<CS>
fn unnest(self) -> VertexAttribute
Auto Trait Implementations§
impl<CS> Freeze for VertexAttributeBuilder<CS>
impl<CS> RefUnwindSafe for VertexAttributeBuilder<CS>where
<CS as State>::Format: RefUnwindSafe,
<CS as State>::Offset: RefUnwindSafe,
<CS as State>::ShaderLocation: RefUnwindSafe,
impl<CS> Send for VertexAttributeBuilder<CS>
impl<CS> Sync for VertexAttributeBuilder<CS>
impl<CS> Unpin for VertexAttributeBuilder<CS>
impl<CS> UnwindSafe for VertexAttributeBuilder<CS>where
<CS as State>::Format: UnwindSafe,
<CS as State>::Offset: UnwindSafe,
<CS as State>::ShaderLocation: 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