-
Undocumented
See moreDeclaration
Swift
public struct Crumb
-
The stack of
Crumb
values that hold a history of the remaining parts of the tree that are not currently in focus.Declaration
Swift
public let breadcrumbs: Breadcrumbs
-
Move the
Zipper
up in the tree.Declaration
Swift
public var up: Zipper? { get }
-
Zipper
wrapping theroot
of theTree
.Declaration
Swift
public var top: Zipper { get }
-
Declaration
Swift
public var children: [Zipper] { get }
Return Value
Zipper
values for each subtree contained by the wrappedTree
, if it is abranch
. -
Declaration
Swift
public var siblings: [Zipper] { get }
Return Value
Zipper
values for each sibling subtree of the wrappedTree
.
-
Create a
Zipper
with aTree
and a history of remaining parts of the tree that are not currently in focus.Declaration
Swift
public init(_ tree: Tree, _ breadcrumbs: Breadcrumbs = Breadcrumbs())
-
Move focus to the sub-tree with the given
index
.Throws
TreeError
if index is out of bounds.Declaration
Swift
public func move(to index: Int) throws -> Zipper
-
Move focus to the sub-tree through the given
path
.Throws
TreeError
if the givenpath
is no good.Declaration
Swift
public func move(through path: [Int]) throws -> Zipper