struct AnyView
Swift
struct AnyView
A view whose type is decided at run time.
For the trees Swift cannot spell. A split holding a split holding a pane is
a type that contains itself, and an opaque some View cannot recurse, so
the recursion is erased here and nowhere else.
It costs what erasure costs everywhere: when the underlying type changes between two rebuilds — a pane turning into a split — the old subtree is unmounted and a new one mounted, and whatever state lived on its nodes (a scroll offset, a text field's caret) starts over. While the type stays the same, reconcile goes straight through to the view's own and is as cheap as it would be without the wrapper.
Sources/LavaUI/AnyView.swift:15
Constructors
init<V>(_ view: V) where V : View
Not documented.
Sources/LavaUI/AnyView.swift:21
Properties
var dumpDetail: String { get }
Not documented.
Sources/LavaUI/AnyView.swift:33
Methods
func mountPrimitive() -> any AnyViewNode
Not documented.
Sources/LavaUI/AnyView.swift:37
func reconcilePrimitive(_ node: any AnyViewNode) -> any AnyViewNode
Not documented.
Sources/LavaUI/AnyView.swift:39
func structureLines(indent: Int = 0) -> [String]
Not documented.
Sources/LavaUI/AnyView.swift:35