wip: rewrite core to be template focused

This commit is contained in:
Jonathan Kelley committed 2022-10-27 21:58:47 -07:00
1 parent 67012c38df
commit 23603aaaf5
34 files changed
+3177 -2456

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
use crate::{ElementId, VNode};
use std::cell::Cell;
/// A list of VNodes with no single root.
pub struct VFragment<'src> {
/// The key of the fragment to be used during keyed diffing.
pub key: Option<&'src str>,
/// The [`ElementId`] of the placeholder if it exists
pub placeholder: Cell<Option<ElementId>>,
/// Fragments can never have zero children. Enforced by NodeFactory.
///
/// You *can* make a fragment with no children, but it's not a valid fragment and your VDom will panic.
pub children: &'src [VNode<'src>],
}