pub fn find_layout_binding(
    bind_group_binding_descriptor_index: usize,
    bind_group_binding: u32,
    layout_bindings: &[BindGroupLayoutEntry],
) -> Option<&BindGroupLayoutEntry> {
    // fast path
    let layout_binding = layout_bindings
        .get(bind_group_binding_descriptor_index)
        .filter(|layout| layout.binding == bind_group_binding);

    layout_binding.or_else(|| {
        layout_bindings
            .iter()
            .find(|layout| layout.binding == bind_group_binding)
    })
}
/// Finds the corresponding `BindGroupLayoutBinding`. The `bind_group_binding_descriptor_index` identifies
/// the index in `BindGroupDescriptor::bindings`. If the corresponding binding is found at this index
/// in `layout_bindings`, it's returned. Otherwise, a linear search is performed.
Finds the corresponding `BindGroupLayoutBinding`. The `bind_group_binding_descriptor_index` identifies
the index in `BindGroupDescriptor::bindings`. If the corresponding binding is found at this index
in `layout_bindings`, it's returned. Otherwise, a linear search is performed.
Finds the corresponding ` BindGroupLayoutBinding ` . The ` bind_group_binding_descriptor_index ` identifies the index in ` BindGroupDescriptor :: bindings ` . If the corresponding binding is found at this index in ` layout_bindings ` it ' s returned . Otherwise a linear search is performed .
pub fn find_layout_binding(
    bind_group_binding_descriptor_index: usize,
    bind_group_binding: u32,
    layout_bindings: &[BindGroupLayoutEntry],
) -> Option<&BindGroupLayoutEntry> {
    // fast path
    let layout_binding = layout_bindings
        .get(bind_group_binding_descriptor_index)
        .filter(|layout| layout.binding == bind_group_binding);
    layout_binding.or_else(|| {
        layout_bindings
            .iter()
            .find(|layout| layout.binding == bind_group_binding)
    })
}
pub fn find_layout_binding ( bind_group_binding_descriptor_index : usize , bind_group_binding : u32 , layout_bindings : & [ BindGroupLayoutEntry ] , ) -> Option < & BindGroupLayoutEntry > { // fast path let layout_binding = layout_bindings . get ( bind_group_binding_descriptor_index ) . filter ( | layout | layout . binding == bind_group_binding ) ; layout_binding . or_else ( | | { layout_bindings . iter ( ) . find ( | layout | layout . binding == bind_group_binding ) } ) }
Finds the corresponding `BindGroupLayoutBinding`.
Finds the corresponding ` BindGroupLayoutBinding ` .
bind_group_binding_descriptor_index
usize
bind_group_binding
u32
layout_bindings
&[BindGroupLayoutEntry]
bind_group_binding_descriptor_index
usize
bind_group_binding
u32
layout_bindings
&[BindGroupLayoutEntry]