pub trait DescriptorBindingArray<K> {
type DescriptorArray;
const COUNT: u32;
const FLAGS: DescriptorBindingFlags;
// Required methods
fn is_compatible(&self, descriptors: &Self::DescriptorArray) -> bool;
fn get_descriptors(
&self,
device: &Device,
) -> Result<Self::DescriptorArray, OutOfMemory>;
// Provided method
fn update_descriptors(
&mut self,
device: &Device,
encoder: &mut Encoder<'_>,
descriptors: &Self::DescriptorArray,
) -> Result<(), OutOfMemory> { ... }
}
Expand description
Trait for all types that can be used as a descriptor array.
Required Associated Constants§
Sourceconst FLAGS: DescriptorBindingFlags
const FLAGS: DescriptorBindingFlags
Flags necessary for this binding type.
Required Associated Types§
Sourcetype DescriptorArray
type DescriptorArray
Descriptors value.
Required Methods§
Sourcefn is_compatible(&self, descriptors: &Self::DescriptorArray) -> bool
fn is_compatible(&self, descriptors: &Self::DescriptorArray) -> bool
Checks descriptors bound to a set.
Returns true
if bound descriptors are compatible with input.
Returns false
if new descriptors should be bound.
Sourcefn get_descriptors(
&self,
device: &Device,
) -> Result<Self::DescriptorArray, OutOfMemory>
fn get_descriptors( &self, device: &Device, ) -> Result<Self::DescriptorArray, OutOfMemory>
Returns Descriptors
equivalent to self.
Provided Methods§
Sourcefn update_descriptors(
&mut self,
device: &Device,
encoder: &mut Encoder<'_>,
descriptors: &Self::DescriptorArray,
) -> Result<(), OutOfMemory>
fn update_descriptors( &mut self, device: &Device, encoder: &mut Encoder<'_>, descriptors: &Self::DescriptorArray, ) -> Result<(), OutOfMemory>
Updates content of descriptors.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.