pub struct DescriptorDesc {
    pub ty: DescriptorDescTy,
    pub array_count: u32,
    pub stages: ShaderStages,
    pub readonly: bool,
}
Expand description

Contains the exact description of a single descriptor.

Note: You are free to fill a DescriptorDesc struct the way you want, but its validity will be checked when you create a pipeline layout, a descriptor set, or when you try to bind a descriptor set.

Fields

ty: DescriptorDescTy

Describes the content and layout of each array element of a descriptor.

array_count: u32

How many array elements this descriptor is made of. The value 0 is invalid and may trigger a panic depending on the situation.

stages: ShaderStages

Which shader stages are going to access this descriptor.

readonly: bool

True if the attachment is only ever read by the shader. False if it is also written.

Implementations

Checks whether we are a superset of another descriptor.

Returns true if self is the same descriptor as other, or if self is the same as other but with a larger array elements count and/or more shader stages.

Builds a DescriptorDesc that is the union of self and other, if possible.

The returned value will be a superset of both self and other.

Returns the pipeline stages and access flags corresponding to the usage of this descriptor.

Panic

Panics if the type is Sampler.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

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.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.