pub enum Subtree {
Leaf(Vec<u8>),
Node(Vec<Subtree>),
}Expand description
Describes a subtree to be appended as a single logical unit. Leaves are the atomic data items (czds). Nodes define intermediate n-ary nodes (transactions, commits).
§Opacity contract
A Leaf is byte-identical whether it carries a raw payload or a child
tree’s root digest: the kernel never branches on a leaf’s origin.
Callers must never attach an is_embedded tag or any other origin marker
to a leaf, because doing so would let the kernel inspect origin and break
this contract. An auditor cannot tell whether a leaf is a raw payload or
an embedded subtree root — that indistinguishability is the security
guarantee.
Variants§
Leaf(Vec<u8>)
A single leaf containing raw payload bytes.
Whether those bytes are a raw application payload or a child tree’s root digest is opaque: the kernel treats both identically (no origin tag).
Node(Vec<Subtree>)
An n-ary internal node with a list of children.