Skip to main content

LayoutModuleReplay

Struct LayoutModuleReplay 

Source
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>

Source

pub fn new( internal: Module, declaration: LeafedInterfaceDeclaration<ConfigType, List>, ) -> Self

Creates a replay runner from a layout module and a stored declaration.

Source

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 a Configure instruction appears while configuring a parent scope.
  • "Bad replay: cannot configure ConfiguredParentElement with leaf config" when a LeafConfig instruction appears while configuring a parent scope.

Auto Trait Implementations§

§

impl<Module, ConfigType, List> Freeze for LayoutModuleReplay<Module, ConfigType, List>
where Module: Freeze, List: Freeze,

§

impl<Module, ConfigType, List> RefUnwindSafe for LayoutModuleReplay<Module, ConfigType, List>
where Module: RefUnwindSafe, List: RefUnwindSafe, ConfigType: RefUnwindSafe,

§

impl<Module, ConfigType, List> Send for LayoutModuleReplay<Module, ConfigType, List>
where Module: Send, List: Send, ConfigType: Send,

§

impl<Module, ConfigType, List> Sync for LayoutModuleReplay<Module, ConfigType, List>
where Module: Sync, List: Sync, ConfigType: Sync,

§

impl<Module, ConfigType, List> Unpin for LayoutModuleReplay<Module, ConfigType, List>
where Module: Unpin, List: Unpin, ConfigType: Unpin,

§

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>
where Module: UnwindSafe, List: UnwindSafe, ConfigType: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.