Versions in this module Expand all Collapse all v0 v0.0.2 Dec 15, 2025 Changes in this version type Root + func (x *Root) Unmarshal(data []byte) error + type VNodeEntry struct + Node triescnp.Node + Prefix []byte v0.0.1 Nov 25, 2025 Changes in this version + var ErrCannotCollapse = errors.Errorf("cannot collapse parent into child") + var ErrCannotSplit = errors.Errorf("cannot split, < 2 entries") + func IsErrNotFound(err error) bool + type Entry struct + Key []byte + Value []byte + func (e *Entry) Marshal() ([]byte, error) + func (e *Entry) Unmarshal(data []byte) error + type ErrNotFound = state.ErrNotFound[[]byte] + type Index struct + Count uint64 + IsParent bool + Prefix []byte + Ref Ref + func (idx *Index) FromEntry(ent Entry) error + func (idx *Index) Marshal(out []byte) []byte + func (idx *Index) ToEntry() *Entry + func (idx *Index) Unmarshal(data []byte) error + type Iterator struct + func (it *Iterator) Next(ctx context.Context, dst *Entry) error + type Machine struct + func NewMachine(salt *blobcache.CID, hf blobcache.HashFunc) *Machine + func (m *Machine) NewTx(prevRoot Root) *Tx + func (m *Machine) NewTxOnEmpty(ctx context.Context, s schema.WO) (*Tx, error) + func (o *Machine) BatchEdit(ctx context.Context, s schema.RW, root Root, opsSeq iter.Seq[Op]) (*Root, error) + func (o *Machine) Delete(ctx context.Context, s schema.RWD, root Root, key []byte) (*Root, error) + func (o *Machine) Get(ctx context.Context, s schema.RO, root Root, key []byte, dst *[]byte) error + func (o *Machine) MinEntry(ctx context.Context, s schema.RO, root Root, gteq []byte) (*Entry, error) + func (o *Machine) NewEmpty(ctx context.Context, s schema.WO) (*Root, error) + func (o *Machine) NewIterator(s schema.RO, root Root, span Span) *Iterator + func (o *Machine) Populate(ctx context.Context, s schema.RO, root Root, set cadata.Set, ...) error + func (o *Machine) PostSlice(ctx context.Context, s schema.WO, ents []*Entry) (*Root, error) + func (o *Machine) Put(ctx context.Context, s schema.RW, root Root, key, value []byte) (*Root, error) + func (o *Machine) Sync(ctx context.Context, dst schema.WO, src schema.RO, root Root, ...) error + func (o *Machine) Validate(ctx context.Context, s schema.RO, x Index) error + func (o *Machine) Walk(ctx context.Context, s schema.RO, root Root, w Walker) error + type Node struct + Entries []*Entry + func (n *Node) Marshal() ([]byte, error) + func (n *Node) Unmarshal(data []byte) error + type Op struct + Key []byte + Value []byte + func OpDelete(key []byte) Op + func OpPut(key []byte, value []byte) Op + func (op Op) Entry() *Entry + func (op Op) IsDelete() bool + type Ref struct + CID cadata.ID + DEK bccrypto.DEK + Length uint32 + type Root Index + func ParseRoot(x []byte) (*Root, error) + func (x *Root) Marshal(out []byte) []byte + type Span = state.ByteSpan + type Tx struct + func (tx *Tx) Delete(ctx context.Context, key []byte) error + func (tx *Tx) Flush(ctx context.Context, s schema.RW) (*Root, error) + func (tx *Tx) Get(ctx context.Context, s schema.RO, key []byte, dst *[]byte) error + func (tx *Tx) Put(ctx context.Context, s schema.RW, key []byte, value []byte) error + func (tx *Tx) Queued() int + type Walker struct + EntryFn func(*Entry) error + NodeFn func(root Root) error + ShouldWalk func(root Root) bool