pub struct StackView<State: 'static> { /* private fields */ }Expand description
A declarative z-ordered stack. See the module docs.
Implementations§
Source§impl<State: 'static> StackView<State>
impl<State: 'static> StackView<State>
Sourcepub fn child<V: View<State>>(self, view: V) -> Self
pub fn child<V: View<State>>(self, view: V) -> Self
Append a child on top of the existing ones. Accepts any View.
Sourcepub fn children<M>(self, children: impl ViewSeq<State, M>) -> Self
pub fn children<M>(self, children: impl ViewSeq<State, M>) -> Self
Append every element of children on top of the existing ones, in order.
Accepts any ViewSeq (Vec, array, tuple, Option, nested, or
views(iter)); tuples are positional and a None element drops its slot.
Trait Implementations§
Source§impl<State: 'static> View<State> for StackView<State>
impl<State: 'static> View<State> for StackView<State>
Source§type Element = StackWidget
type Element = StackWidget
The retained widget this view produces.
Source§fn build(&self, ctx: &mut BuildCtx<'_>) -> StackWidget
fn build(&self, ctx: &mut BuildCtx<'_>) -> StackWidget
Materialise a fresh widget for this view.
Source§fn rebuild(
&self,
prev: &Self,
element: &mut StackWidget,
ctx: &mut BuildCtx<'_>,
) -> ChangeFlags
fn rebuild( &self, prev: &Self, element: &mut StackWidget, ctx: &mut BuildCtx<'_>, ) -> ChangeFlags
Reconcile
prev (the previous view of the same type) against the live
element, mutating it in place and reporting what changed.Auto Trait Implementations§
impl<State> !RefUnwindSafe for StackView<State>
impl<State> !Send for StackView<State>
impl<State> !Sync for StackView<State>
impl<State> !UnwindSafe for StackView<State>
impl<State> Freeze for StackView<State>
impl<State> Unpin for StackView<State>
impl<State> UnsafeUnpin for StackView<State>
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.