pub struct DescriptorBinding {
pub slot: u32,
pub binding_type: BindingType,
pub count: u32,
pub label: Option<String>,
}Expand description
A single binding within a descriptor set.
Fields§
§slot: u32The binding slot index.
binding_type: BindingTypeThe type of resource at this slot.
count: u32The number of array elements (1 for non-array bindings).
label: Option<String>An optional debug label.
Implementations§
Source§impl DescriptorBinding
impl DescriptorBinding
Sourcepub fn new(slot: u32, binding_type: BindingType) -> Self
pub fn new(slot: u32, binding_type: BindingType) -> Self
Create a new binding for a single resource.
Sourcepub fn array(slot: u32, binding_type: BindingType, count: u32) -> Self
pub fn array(slot: u32, binding_type: BindingType, count: u32) -> Self
Create a new array binding.
Sourcepub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
Attach a debug label.
Trait Implementations§
Source§impl Clone for DescriptorBinding
impl Clone for DescriptorBinding
Source§fn clone(&self) -> DescriptorBinding
fn clone(&self) -> DescriptorBinding
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DescriptorBinding
impl RefUnwindSafe for DescriptorBinding
impl Send for DescriptorBinding
impl Sync for DescriptorBinding
impl Unpin for DescriptorBinding
impl UnsafeUnpin for DescriptorBinding
impl UnwindSafe for DescriptorBinding
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more