pub struct LayoutModuleReplay<Module, ConfigType, List: Copy> { /* private fields */ }Expand description
Replays a stored UI declaration through a layout manager in one isolated frame.
Unlike the UiFn path (stage 2 of the debug pipeline), this type
does not require CotisApp. It calls init, prepare, and
a single begin_frame on the wrapped layout module, then interprets the declaration
instructions to rebuild the element tree.
Implementations§
Source§impl<Module, ConfigType, List: Copy> LayoutModuleReplay<Module, ConfigType, List>
impl<Module, ConfigType, List: Copy> LayoutModuleReplay<Module, ConfigType, List>
Sourcepub fn new(
internal: Module,
declaration: LeafedInterfaceDeclaration<ConfigType, List>,
) -> Self
pub fn new( internal: Module, declaration: LeafedInterfaceDeclaration<ConfigType, List>, ) -> Self
Creates a replay runner from a layout module and a stored declaration.
Sourcepub fn replay<'frame, RenderCommandType, Renderer>(
&mut self,
renderer: &mut Renderer,
) -> Vec<RenderCommandType>where
ConfigType: 'frame + Clone,
RenderCommandType: 'frame,
Module: LayoutManager<'frame, ConfigType, RenderCommandType> + LayoutManagerCompatible<Renderer>,
for<'layout> List: LeafConfigListCompatible<Module::ElementConfigurer<'layout>, ConfigType>,
pub fn replay<'frame, RenderCommandType, Renderer>(
&mut self,
renderer: &mut Renderer,
) -> Vec<RenderCommandType>where
ConfigType: 'frame + Clone,
RenderCommandType: 'frame,
Module: LayoutManager<'frame, ConfigType, RenderCommandType> + LayoutManagerCompatible<Renderer>,
for<'layout> List: LeafConfigListCompatible<Module::ElementConfigurer<'layout>, ConfigType>,
Runs one isolated layout frame and returns the layout module’s output.
This initializes the layout module, replays all declaration instructions against the frame root, closes the root element, and collects the frame’s layout output.
§Panics
Panics if the stored instruction stream is invalid for replay:
"Bad replay: cannot configure ConfiguredParentElement"when aConfigureinstruction appears while configuring a parent scope."Bad replay: cannot configure ConfiguredParentElement with leaf config"when aLeafConfiginstruction appears while configuring a parent scope.
Auto Trait Implementations§
impl<Module, ConfigType, List> Freeze for LayoutModuleReplay<Module, ConfigType, List>
impl<Module, ConfigType, List> RefUnwindSafe for LayoutModuleReplay<Module, ConfigType, List>
impl<Module, ConfigType, List> Send for LayoutModuleReplay<Module, ConfigType, List>
impl<Module, ConfigType, List> Sync for LayoutModuleReplay<Module, ConfigType, List>
impl<Module, ConfigType, List> Unpin for LayoutModuleReplay<Module, ConfigType, List>
impl<Module, ConfigType, List> UnsafeUnpin for LayoutModuleReplay<Module, ConfigType, List>where
Module: UnsafeUnpin,
List: UnsafeUnpin,
impl<Module, ConfigType, List> UnwindSafe for LayoutModuleReplay<Module, ConfigType, List>
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