indexed

package
v0.17.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferedEncoder

type BufferedEncoder struct {
	*bytes.Buffer
	cbor.Encoder
}

func NewBufferedEncoder

func NewBufferedEncoder() BufferedEncoder

func (BufferedEncoder) WriteSeq added in v0.16.6

func (writer BufferedEncoder) WriteSeq[T any](items iter.Seq2[T, error]) ([]int, error)

type LazySlice

type LazySlice[T any] struct {
	// contains filtered or unexported fields
}

Items are stored contiguously in a data slice, with an indexes slice marking each item’s start offset. The data is encoded using CBOR and deserialized into type T on demand. Example:

data: [00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19] - ----- -------- -------------- - ↑ ↑ ↑ ↑ indexes: [10 12 15] 20 (len(data))

func NewLazySlice

func NewLazySlice[T any](indexes []int, data []byte) LazySlice[T]

func (LazySlice[T]) All

func (l LazySlice[T]) All() ([]T, error)

func (LazySlice[T]) AllMapped added in v0.16.6

func (l LazySlice[T]) AllMapped[R any](
	extract func(index int, value T) (R, error),
) ([]R, error)

func (LazySlice[T]) Get

func (l LazySlice[T]) Get(index int) (T, error)

func (LazySlice[T]) Iter added in v0.15.18

func (l LazySlice[T]) Iter() iter.Seq2[T, error]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL