logo
pub struct WriteDescriptorSet { /* private fields */ }
Expand description

Represents a single write operation to the binding of a descriptor set.

WriteDescriptorSet specifies the binding number and target array index, and includes one or more resources of a given type that need to be written to that location. Two constructors are provided for each resource type:

  • The basic constructor variant writes a single element to array index 0. It is intended for non-arrayed bindings, where descriptor_count in the descriptor set layout is 1.
  • The _array variant writes several elements and allows specifying the target array index. At least one element must be provided; a panic results if the provided iterator is empty.

Implementations

Write an empty element to array element 0.

See none_array for more information.

Write a number of consecutive empty elements.

This is used for push descriptors in combination with Sampler descriptors that have immutable samplers in the layout. The Vulkan spec requires these elements to be explicitly written, but since there is no data to write, a dummy write is provided instead.

For regular descriptor sets, the data for such descriptors is automatically valid, and dummy writes are not allowed.

Write a single buffer to array element 0.

Write a number of consecutive buffer elements.

Write a single buffer view to array element 0.

Write a number of consecutive buffer view elements.

Write a single image view to array element 0.

Write a number of consecutive image view elements.

Write a single image view and sampler to array element 0.

Write a number of consecutive image view and sampler elements.

Write a single sampler to array element 0.

Write a number of consecutive sampler elements.

Returns the binding number that is updated by this descriptor write.

Returns the first array element in the binding that is updated by this descriptor write.

Returns a reference to the elements held by this descriptor write.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Builds a pointer to this type from a raw pointer.

Returns true if the size is suitable to store a type like this.

Returns the size of an individual element.

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.