Struct vulkano::descriptor_set::persistent::PersistentDescriptorSetBuilder [−][src]
pub struct PersistentDescriptorSetBuilder<R> { /* fields omitted */ }
Expand description
Prototype of a PersistentDescriptorSet
.
The template parameter R
is an unspecified type that represents the list of resources.
See the docs of PersistentDescriptorSet
for an example.
Implementations
pub fn build(
self
) -> Result<PersistentDescriptorSet<R, StdDescriptorPoolAlloc>, PersistentDescriptorSetBuildError>
pub fn build(
self
) -> Result<PersistentDescriptorSet<R, StdDescriptorPoolAlloc>, PersistentDescriptorSetBuildError>
Builds a PersistentDescriptorSet
from the builder.
pub fn build_with_pool<P: ?Sized>(
self,
pool: &mut P
) -> Result<PersistentDescriptorSet<R, P::Alloc>, PersistentDescriptorSetBuildError> where
P: ?Sized + DescriptorPool,
pub fn build_with_pool<P: ?Sized>(
self,
pool: &mut P
) -> Result<PersistentDescriptorSet<R, P::Alloc>, PersistentDescriptorSetBuildError> where
P: ?Sized + DescriptorPool,
Builds a PersistentDescriptorSet
from the builder.
Panic
Panics if the pool doesn’t have the same device as the descriptor set layout.
pub fn enter_array(
self
) -> Result<PersistentDescriptorSetBuilderArray<R>, PersistentDescriptorSetError>
pub fn enter_array(
self
) -> Result<PersistentDescriptorSetBuilderArray<R>, PersistentDescriptorSetError>
Call this function if the next element of the set is an array in order to set the value of each element.
Returns an error if the descriptor is empty.
This function can be called even if the descriptor isn’t an array, and it is valid to enter the “array”, add one element, then leave.
pub fn add_empty(
self
) -> Result<PersistentDescriptorSetBuilder<R>, PersistentDescriptorSetError>
pub fn add_empty(
self
) -> Result<PersistentDescriptorSetBuilder<R>, PersistentDescriptorSetError>
Skips the current descriptor if it is empty.
pub fn add_buffer<T>(
self,
buffer: T
) -> Result<PersistentDescriptorSetBuilder<(R, PersistentDescriptorSetBuf<T>)>, PersistentDescriptorSetError> where
T: BufferAccess,
pub fn add_buffer<T>(
self,
buffer: T
) -> Result<PersistentDescriptorSetBuilder<(R, PersistentDescriptorSetBuf<T>)>, PersistentDescriptorSetError> where
T: BufferAccess,
Binds a buffer as the next descriptor.
An error is returned if the buffer isn’t compatible with the descriptor.
Panic
Panics if the buffer doesn’t have the same device as the descriptor set layout.
pub fn add_buffer_view<T>(
self,
view: T
) -> Result<PersistentDescriptorSetBuilder<(R, PersistentDescriptorSetBufView<T>)>, PersistentDescriptorSetError> where
T: BufferViewRef,
pub fn add_buffer_view<T>(
self,
view: T
) -> Result<PersistentDescriptorSetBuilder<(R, PersistentDescriptorSetBufView<T>)>, PersistentDescriptorSetError> where
T: BufferViewRef,
Binds a buffer view as the next descriptor.
An error is returned if the buffer isn’t compatible with the descriptor.
Panic
Panics if the buffer view doesn’t have the same device as the descriptor set layout.
pub fn add_image<T>(
self,
image_view: T
) -> Result<PersistentDescriptorSetBuilder<(R, PersistentDescriptorSetImg<T>)>, PersistentDescriptorSetError> where
T: ImageViewAbstract,
pub fn add_image<T>(
self,
image_view: T
) -> Result<PersistentDescriptorSetBuilder<(R, PersistentDescriptorSetImg<T>)>, PersistentDescriptorSetError> where
T: ImageViewAbstract,
Binds an image view as the next descriptor.
An error is returned if the image view isn’t compatible with the descriptor.
Panic
Panics if the image view doesn’t have the same device as the descriptor set layout.
pub fn add_sampled_image<T>(
self,
image_view: T,
sampler: Arc<Sampler>
) -> Result<PersistentDescriptorSetBuilder<((R, PersistentDescriptorSetImg<T>), PersistentDescriptorSetSampler)>, PersistentDescriptorSetError> where
T: ImageViewAbstract,
pub fn add_sampled_image<T>(
self,
image_view: T,
sampler: Arc<Sampler>
) -> Result<PersistentDescriptorSetBuilder<((R, PersistentDescriptorSetImg<T>), PersistentDescriptorSetSampler)>, PersistentDescriptorSetError> where
T: ImageViewAbstract,
Binds an image view with a sampler as the next descriptor.
An error is returned if the image view isn’t compatible with the descriptor.
Panic
Panics if the image view or the sampler doesn’t have the same device as the descriptor set layout.
pub fn add_sampler(
self,
sampler: Arc<Sampler>
) -> Result<PersistentDescriptorSetBuilder<(R, PersistentDescriptorSetSampler)>, PersistentDescriptorSetError>
pub fn add_sampler(
self,
sampler: Arc<Sampler>
) -> Result<PersistentDescriptorSetBuilder<(R, PersistentDescriptorSetSampler)>, PersistentDescriptorSetError>
Binds a sampler as the next descriptor.
An error is returned if the sampler isn’t compatible with the descriptor.
Panic
Panics if the sampler doesn’t have the same device as the descriptor set layout.
Auto Trait Implementations
impl<R> RefUnwindSafe for PersistentDescriptorSetBuilder<R> where
R: RefUnwindSafe,
impl<R> Send for PersistentDescriptorSetBuilder<R> where
R: Send,
impl<R> Sync for PersistentDescriptorSetBuilder<R> where
R: Sync,
impl<R> Unpin for PersistentDescriptorSetBuilder<R> where
R: Unpin,
impl<R> UnwindSafe for PersistentDescriptorSetBuilder<R> where
R: UnwindSafe,
Blanket Implementations
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.