pub struct FragmentBuilder<Children> { /* private fields */ }Expand description
A typed fragment view: an ordered group of children with no enclosing element.
Like ElementBuilder it collects children into a cons list via
FragmentBuilder::child, but it contributes no node of its own - it lowers to exactly its
children, in order. That makes it the container for a template’s roots and for grouping more
siblings than a single tuple can hold: View/ViewTemplate are only implemented for tuples up
to arity 128, so wider lists are split into several tuple groups joined through .child(..).
Nested fragments and tuples flatten transparently into the surrounding template, so the grouping
leaves no trace in the lowered ops or dynamic-slot order.
Implementations§
Source§impl<Children> FragmentBuilder<Children>
impl<Children> FragmentBuilder<Children>
Sourcepub fn child<Child, Marker>(
self,
child: Child,
) -> FragmentBuilder<(Children, <Child as IntoViewChild<Marker>>::Output)>where
Child: IntoViewChild<Marker>,
pub fn child<Child, Marker>(
self,
child: Child,
) -> FragmentBuilder<(Children, <Child as IntoViewChild<Marker>>::Output)>where
Child: IntoViewChild<Marker>,
Append one child.
Trait Implementations§
Source§impl<Children: View> View for FragmentBuilder<Children>
impl<Children: View> View for FragmentBuilder<Children>
Source§fn push(self, dynamic: &mut DynamicValues)
fn push(self, dynamic: &mut DynamicValues)
Push runtime dynamic nodes and attributes in template order.
Source§impl<Children: ViewTemplate> ViewTemplate for FragmentBuilder<Children>
impl<Children: ViewTemplate> ViewTemplate for FragmentBuilder<Children>
Source§const TEMPLATE_TREE: &'static TemplateRawTree = Children::TEMPLATE_TREE
const TEMPLATE_TREE: &'static TemplateRawTree = Children::TEMPLATE_TREE
The static tree for this view type.
Auto Trait Implementations§
impl<Children> Freeze for FragmentBuilder<Children>where
Children: Freeze,
impl<Children> RefUnwindSafe for FragmentBuilder<Children>where
Children: RefUnwindSafe,
impl<Children> Send for FragmentBuilder<Children>where
Children: Send,
impl<Children> Sync for FragmentBuilder<Children>where
Children: Sync,
impl<Children> Unpin for FragmentBuilder<Children>where
Children: Unpin,
impl<Children> UnsafeUnpin for FragmentBuilder<Children>where
Children: UnsafeUnpin,
impl<Children> UnwindSafe for FragmentBuilder<Children>where
Children: 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<V> IntoViewChild for Vwhere
V: View,
impl<V> IntoViewChild for Vwhere
V: View,
Source§fn into_child(self) -> <V as IntoViewChild>::Output
fn into_child(self) -> <V as IntoViewChild>::Output
Convert into the child view.
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.
Source§impl<V> ViewExt for Vwhere
V: View,
impl<V> ViewExt for Vwhere
V: View,
Source§fn into_vnode(self) -> VNode
fn into_vnode(self) -> VNode
Convert this view into a
VNode.