pub struct LayoutModuleCapture<Module, ElementsOutput: Clone + Serialize> { /* private fields */ }Expand description
Wraps a layout manager and accumulates layout output across frames.
Implements LayoutManager and
LayoutManagerCompatible, delegating all
operations to the inner module while copying each frame’s output into an internal
vector accessible via output.
§Recommended usage
Use for single-frame capture: run one compute_frame, then call
store_computed_layout with output().
If used across multiple frames, output() grows unbounded — each frame’s results are
appended. There is no automatic reset; avoid multi-frame capture unless you manage the
accumulated vector explicitly.
Implementations§
Source§impl<Module, ElementsOutput: Clone + Serialize> LayoutModuleCapture<Module, ElementsOutput>
impl<Module, ElementsOutput: Clone + Serialize> LayoutModuleCapture<Module, ElementsOutput>
Trait Implementations§
Source§impl<'frame, Module, ElementsOutput: 'frame + Clone + Serialize, ConfigType: 'frame> LayoutManager<'frame, ConfigType, ElementsOutput> for LayoutModuleCapture<Module, ElementsOutput>where
Module: LayoutManager<'frame, ConfigType, ElementsOutput>,
impl<'frame, Module, ElementsOutput: 'frame + Clone + Serialize, ConfigType: 'frame> LayoutManager<'frame, ConfigType, ElementsOutput> for LayoutModuleCapture<Module, ElementsOutput>where
Module: LayoutManager<'frame, ConfigType, ElementsOutput>,
Source§type ElementConfigurer<'layout> = <Module as LayoutManager<'frame, ConfigType, ElementsOutput>>::ElementConfigurer<'layout>
where
Self: 'layout,
ConfigType: 'frame,
ElementsOutput: 'frame
type ElementConfigurer<'layout> = <Module as LayoutManager<'frame, ConfigType, ElementsOutput>>::ElementConfigurer<'layout> where Self: 'layout, ConfigType: 'frame, ElementsOutput: 'frame
The configurator type used while constructing one frame.
Source§fn begin_frame<'layout>(
&'layout mut self,
) -> impl LayoutFrameManager<'frame, ConfigType, ElementsOutput, Self::ElementConfigurer<'layout>>where
Self: 'layout,
ConfigType: 'frame,
ElementsOutput: 'frame,
fn begin_frame<'layout>(
&'layout mut self,
) -> impl LayoutFrameManager<'frame, ConfigType, ElementsOutput, Self::ElementConfigurer<'layout>>where
Self: 'layout,
ConfigType: 'frame,
ElementsOutput: 'frame,
Starts a new frame and returns a frame manager used to build UI.
Source§impl<Module, ElementsOutput: Clone + Serialize, Render> LayoutManagerCompatible<Render> for LayoutModuleCapture<Module, ElementsOutput>where
Module: LayoutManagerCompatible<Render>,
impl<Module, ElementsOutput: Clone + Serialize, Render> LayoutManagerCompatible<Render> for LayoutModuleCapture<Module, ElementsOutput>where
Module: LayoutManagerCompatible<Render>,
Auto Trait Implementations§
impl<Module, ElementsOutput> Freeze for LayoutModuleCapture<Module, ElementsOutput>where
Module: Freeze,
impl<Module, ElementsOutput> RefUnwindSafe for LayoutModuleCapture<Module, ElementsOutput>where
Module: RefUnwindSafe,
ElementsOutput: RefUnwindSafe,
impl<Module, ElementsOutput> Send for LayoutModuleCapture<Module, ElementsOutput>
impl<Module, ElementsOutput> Sync for LayoutModuleCapture<Module, ElementsOutput>
impl<Module, ElementsOutput> Unpin for LayoutModuleCapture<Module, ElementsOutput>
impl<Module, ElementsOutput> UnsafeUnpin for LayoutModuleCapture<Module, ElementsOutput>where
Module: UnsafeUnpin,
impl<Module, ElementsOutput> UnwindSafe for LayoutModuleCapture<Module, ElementsOutput>where
Module: UnwindSafe,
ElementsOutput: 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