pub struct CommandScratch<C: Copy> { /* private fields */ }Expand description
Reusable storage for trivially owned command descriptors.
The caller clears the logical length between recording epochs. Capacity
never grows, so push is allocation-free after construction.
Implementations§
Source§impl<C: Copy> CommandScratch<C>
impl<C: Copy> CommandScratch<C>
Sourcepub fn push(&mut self, command: C) -> Result<(), ScratchFull>
pub fn push(&mut self, command: C) -> Result<(), ScratchFull>
Appends one command without growing storage.
§Errors
Returns ScratchFull when fixed capacity is exhausted.
Sourcepub fn as_mut_slice(&mut self) -> &mut [C]
pub fn as_mut_slice(&mut self) -> &mut [C]
Mutable command storage for in-place lowering or sorting.
Sourcepub const fn metrics(&self) -> CommandScratchMetrics
pub const fn metrics(&self) -> CommandScratchMetrics
Current cumulative counters.
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for CommandScratch<C>
impl<C> RefUnwindSafe for CommandScratch<C>where
Vec<C>: RefUnwindSafe,
impl<C> Send for CommandScratch<C>
impl<C> Sync for CommandScratch<C>
impl<C> Unpin for CommandScratch<C>
impl<C> UnsafeUnpin for CommandScratch<C>where
Vec<C>: UnsafeUnpin,
impl<C> UnwindSafe for CommandScratch<C>where
Vec<C>: 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