Type Alias wgpu_core::binding_model::BindGroupLayouts
source · pub type BindGroupLayouts<A> = Storage<BindGroupLayout<A>, BindGroupLayoutId>;
Aliased Type§
struct BindGroupLayouts<A> {
pub(crate) map: Vec<Element<BindGroupLayout<A>>, Global>,
pub(crate) kind: &'static str,
pub(crate) _phantom: PhantomData<Id<BindGroupLayout<Api>>>,
}
Fields§
§map: Vec<Element<BindGroupLayout<A>>, Global>
§kind: &'static str
§_phantom: PhantomData<Id<BindGroupLayout<Api>>>
Implementations§
source§impl<T, I: TypedId> Storage<T, I>
impl<T, I: TypedId> Storage<T, I>
pub(crate) fn contains(&self, id: I) -> bool
sourcepub(crate) fn try_get(&self, id: I) -> Result<Option<&T>, InvalidId>
pub(crate) fn try_get(&self, id: I) -> Result<Option<&T>, InvalidId>
Attempts to get a reference to an item behind a potentially invalid ID.
Returns None
if there is an epoch mismatch, or the entry is empty.
This function is primarily intended for the as_hal
family of functions
where you may need to fallibly get a object backed by an id that could
be in a different hub.
sourcepub(crate) fn get(&self, id: I) -> Result<&T, InvalidId>
pub(crate) fn get(&self, id: I) -> Result<&T, InvalidId>
Get a reference to an item behind a potentially invalid ID. Panics if there is an epoch mismatch, or the entry is empty.
sourcepub(crate) fn get_mut(&mut self, id: I) -> Result<&mut T, InvalidId>
pub(crate) fn get_mut(&mut self, id: I) -> Result<&mut T, InvalidId>
Get a mutable reference to an item behind a potentially invalid ID. Panics if there is an epoch mismatch, or the entry is empty.