pub struct LazyContainer { /* private fields */ }Expand description
A view wrapper that executes an arbitrary Layout implementation
with reconstructable views, which can support lazy layouting.
Unlike FixedContainer, this container stores views as an AnyViews
collection, allowing backends to reconstruct views on-demand for efficient
rendering of large lists.
Implementations§
Source§impl LazyContainer
impl LazyContainer
Sourcepub fn new<V: View>(
layout: impl Layout + 'static,
contents: impl Views<View = V> + 'static,
) -> Self
pub fn new<V: View>( layout: impl Layout + 'static, contents: impl Views<View = V> + 'static, ) -> Self
Wraps the supplied layout object and views into a lazy container view.
Sourcepub fn into_inner(self) -> (Box<dyn Layout>, AnyViews<AnyView>)
pub fn into_inner(self) -> (Box<dyn Layout>, AnyViews<AnyView>)
Returns the boxed layout object together with the collected child views.
Sourcepub fn as_parts(&self) -> (&dyn Layout, &AnyViews<AnyView>)
pub fn as_parts(&self) -> (&dyn Layout, &AnyViews<AnyView>)
Returns borrowed access to the boxed layout and lazy child collection.
Sourcepub fn direction(&self) -> Computed<LayoutDirection>
pub fn direction(&self) -> Computed<LayoutDirection>
Returns the resolved logical layout direction for lazy placement.
Trait Implementations§
Source§impl Debug for LazyContainer
impl Debug for LazyContainer
Source§impl NativeView for LazyContainer
impl NativeView for LazyContainer
Source§fn stretch_axis(&self) -> StretchAxis
fn stretch_axis(&self) -> StretchAxis
Which axis (or axes) this view stretches to fill available space.
Source§impl View for LazyContainer
impl View for LazyContainer
Auto Trait Implementations§
impl !RefUnwindSafe for LazyContainer
impl !Send for LazyContainer
impl !Sync for LazyContainer
impl !UnwindSafe for LazyContainer
impl Freeze for LazyContainer
impl Unpin for LazyContainer
impl UnsafeUnpin for LazyContainer
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
Source§impl<T> IdentifiableExt for T
impl<T> IdentifiableExt for T
Source§impl<V> PositionExt for Vwhere
V: View,
impl<V> PositionExt for Vwhere
V: View,
Source§fn position(
self,
x: impl IntoSignalF32,
y: impl IntoSignalF32,
) -> PositionedChild<Self>
fn position( self, x: impl IntoSignalF32, y: impl IntoSignalF32, ) -> PositionedChild<Self>
Position view’s center at absolute (x, y) coordinates. Read more
Source§fn position_anchor(
self,
anchor: UnitPoint,
x: impl IntoSignalF32,
y: impl IntoSignalF32,
) -> PositionedChild<Self>
fn position_anchor( self, anchor: UnitPoint, x: impl IntoSignalF32, y: impl IntoSignalF32, ) -> PositionedChild<Self>
Position view’s anchor point at absolute coordinates. Read more
Source§fn position_in(self, position: UnitPoint) -> PositionedChild<Self>
fn position_in(self, position: UnitPoint) -> PositionedChild<Self>
Position view’s center at fractional location in parent. Read more
Source§fn position_in_anchor(
self,
anchor: UnitPoint,
position: UnitPoint,
) -> PositionedChild<Self>
fn position_in_anchor( self, anchor: UnitPoint, position: UnitPoint, ) -> PositionedChild<Self>
Position view’s anchor at fractional location in parent. Read more
Source§fn position_in_offset(
self,
anchor: UnitPoint,
position: UnitPoint,
offset_x: impl IntoSignalF32,
offset_y: impl IntoSignalF32,
) -> PositionedChild<Self>
fn position_in_offset( self, anchor: UnitPoint, position: UnitPoint, offset_x: impl IntoSignalF32, offset_y: impl IntoSignalF32, ) -> PositionedChild<Self>
Position with fractional location plus offset. Read more
Source§fn pin(self, constraints: PinConstraints) -> PositionedChild<Self>
fn pin(self, constraints: PinConstraints) -> PositionedChild<Self>
Position using edge pins and optional explicit size. Read more