pub struct FrameStorage<const N: usize, S> { /* private fields */ }Expand description
An ordering table together with the packet storage its frames link.
The unit draw_async and FramePair keep
'static while the GPU walks it. S is whatever holds the packets:
an array, or a struct of arrays per packet type.
Implementations§
Source§impl<const N: usize, S> FrameStorage<N, S>
impl<const N: usize, S> FrameStorage<N, S>
Sourcepub fn packets_mut(&mut self) -> &mut S
pub fn packets_mut(&mut self) -> &mut S
The packet storage, outside any frame.
Sourcepub fn draw_async<R>(
&'static mut self,
dma: GpuDma,
build: impl for<'f> FnOnce(&mut OtFrame<'f, N>, &'f mut S) -> R,
) -> (InFlight<N, S>, R)
pub fn draw_async<R>( &'static mut self, dma: GpuDma, build: impl for<'f> FnOnce(&mut OtFrame<'f, N>, &'f mut S) -> R, ) -> (InFlight<N, S>, R)
Build a frame with build, then kick it and return without waiting.
The storage and the DMA token move into the returned InFlight
until InFlight::wait hands them back. build gets the frame and
the packet storage for a lifetime it cannot leak.