Struct blade_graphics::ResourceArray
source · pub struct ResourceArray<T, const N: ResourceIndex> { /* private fields */ }Expand description
An array of resources to be used with shader bindings. The generic argument tells the maximum number of resources.
Implementations§
source§impl<T, const N: ResourceIndex> ResourceArray<T, N>
impl<T, const N: ResourceIndex> ResourceArray<T, N>
pub fn new() -> Self
pub fn alloc(&mut self, value: T) -> ResourceIndex
pub fn free(&mut self, index: ResourceIndex)
pub fn clear(&mut self)
Trait Implementations§
source§impl<T, const N: ResourceIndex> Index<u32> for ResourceArray<T, N>
impl<T, const N: ResourceIndex> Index<u32> for ResourceArray<T, N>
source§impl<T, const N: ResourceIndex> IndexMut<u32> for ResourceArray<T, N>
impl<T, const N: ResourceIndex> IndexMut<u32> for ResourceArray<T, N>
Auto Trait Implementations§
impl<T, const N: u32> RefUnwindSafe for ResourceArray<T, N>where T: RefUnwindSafe,
impl<T, const N: u32> Send for ResourceArray<T, N>where T: Send,
impl<T, const N: u32> Sync for ResourceArray<T, N>where T: Sync,
impl<T, const N: u32> Unpin for ResourceArray<T, N>where T: Unpin,
impl<T, const N: u32> UnwindSafe for ResourceArray<T, N>where T: UnwindSafe,
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