Documentation ¶
Index ¶
- Constants
- func FromArray(ctx context.Context, bs cbor.IpldStore, vals []cbg.CBORMarshaler) (cid.Cid, error)
- type ErrNotFound
- type Node
- type Root
- func (r *Root) BatchDelete(ctx context.Context, indices []uint64) error
- func (r *Root) BatchSet(ctx context.Context, vals []cbg.CBORMarshaler) error
- func (r *Root) Delete(ctx context.Context, i uint64) error
- func (r *Root) FirstSetIndex(ctx context.Context) (uint64, error)
- func (r *Root) Flush(ctx context.Context) (cid.Cid, error)
- func (r *Root) ForEach(ctx context.Context, cb func(uint64, *cbg.Deferred) error) error
- func (r *Root) ForEachAt(ctx context.Context, start uint64, cb func(uint64, *cbg.Deferred) error) error
- func (r *Root) Get(ctx context.Context, i uint64, out interface{}) error
- func (t *Root) MarshalCBOR(w io.Writer) error
- func (r *Root) Set(ctx context.Context, i uint64, val interface{}) error
- func (r *Root) Subtract(ctx context.Context, or *Root) error
- func (t *Root) UnmarshalCBOR(r io.Reader) error
Constants ¶
View Source
const MaxIndex = uint64(1<<maxIndexBits) - 1
MaxIndex is the maximum index for elements in the AMT. This is currently 1^63 (max int) because the width is 8. That means every "level" consumes 3 bits from the index, and 63/3 is a nice even 21
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrNotFound ¶
type ErrNotFound struct {
Index uint64
}
func (ErrNotFound) Error ¶
func (e ErrNotFound) Error() string
func (ErrNotFound) NotFound ¶
func (e ErrNotFound) NotFound() bool
type Node ¶
Click to show internal directories.
Click to hide internal directories.