Version: v0.9.20 Latest Latest

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

Go to latest
Published: Mar 28, 2021 License: Apache-2.0 Imports: 2 Imported by: 0




This section is empty.


This section is empty.


func AsByteSlice

func AsByteSlice(x interface{}) []byte

AsByteSlice takes a slice of anything and returns a casted-as-byte-slice view of it. This function panics if input is not a slice.

func Copy

func Copy(t reflect.Type, dst, src *Header) int

func CopyIter

func CopyIter(t reflect.Type, dst, src *Header, diter, siter Iterator) int

func CopySliced

func CopySliced(t reflect.Type, dst *Header, dstart, dend int, src *Header, sstart, send int) int

func ElementAt

func ElementAt(i int, base unsafe.Pointer, typeSize uintptr) unsafe.Pointer

Element gets the pointer of ith element

func Fill

func Fill(t reflect.Type, dst, src *Header) int

func FromMemory

func FromMemory(ptr uintptr, memsize uintptr) []byte


type Header struct {
	Raw []byte

Header is runtime representation of a slice. It's a cleaner version of reflect.SliceHeader. With this, we wouldn't need to keep the uintptr. This usually means additional pressure for the GC though, especially when passing around Headers

func (*Header) Bools

func (h *Header) Bools() []bool

func (*Header) Complex128s

func (h *Header) Complex128s() []complex128

func (*Header) Complex64s

func (h *Header) Complex64s() []complex64

func (*Header) Float32s

func (h *Header) Float32s() []float32

func (*Header) Float64s

func (h *Header) Float64s() []float64

func (*Header) GetB

func (h *Header) GetB(i int) bool

func (*Header) GetC128

func (h *Header) GetC128(i int) complex128

func (*Header) GetC64

func (h *Header) GetC64(i int) complex64

func (*Header) GetF32

func (h *Header) GetF32(i int) float32

func (*Header) GetF64

func (h *Header) GetF64(i int) float64

func (*Header) GetI

func (h *Header) GetI(i int) int

func (*Header) GetI16

func (h *Header) GetI16(i int) int16

func (*Header) GetI32

func (h *Header) GetI32(i int) int32

func (*Header) GetI64

func (h *Header) GetI64(i int) int64

func (*Header) GetI8

func (h *Header) GetI8(i int) int8

func (*Header) GetStr

func (h *Header) GetStr(i int) string

func (*Header) GetU

func (h *Header) GetU(i int) uint

func (*Header) GetU16

func (h *Header) GetU16(i int) uint16

func (*Header) GetU32

func (h *Header) GetU32(i int) uint32

func (*Header) GetU64

func (h *Header) GetU64(i int) uint64

func (*Header) GetU8

func (h *Header) GetU8(i int) uint8

func (*Header) GetUintptr

func (h *Header) GetUintptr(i int) uintptr

func (*Header) GetUnsafePointer

func (h *Header) GetUnsafePointer(i int) unsafe.Pointer

func (*Header) Int16s

func (h *Header) Int16s() []int16

func (*Header) Int32s

func (h *Header) Int32s() []int32

func (*Header) Int64s

func (h *Header) Int64s() []int64

func (*Header) Int8s

func (h *Header) Int8s() []int8

func (*Header) Ints

func (h *Header) Ints() []int

func (*Header) SetB

func (h *Header) SetB(i int, x bool)

func (*Header) SetC128

func (h *Header) SetC128(i int, x complex128)

func (*Header) SetC64

func (h *Header) SetC64(i int, x complex64)

func (*Header) SetF32

func (h *Header) SetF32(i int, x float32)

func (*Header) SetF64

func (h *Header) SetF64(i int, x float64)

func (*Header) SetI

func (h *Header) SetI(i int, x int)

func (*Header) SetI16

func (h *Header) SetI16(i int, x int16)

func (*Header) SetI32

func (h *Header) SetI32(i int, x int32)

func (*Header) SetI64

func (h *Header) SetI64(i int, x int64)

func (*Header) SetI8

func (h *Header) SetI8(i int, x int8)

func (*Header) SetStr

func (h *Header) SetStr(i int, x string)

func (*Header) SetU

func (h *Header) SetU(i int, x uint)

func (*Header) SetU16

func (h *Header) SetU16(i int, x uint16)

func (*Header) SetU32

func (h *Header) SetU32(i int, x uint32)

func (*Header) SetU64

func (h *Header) SetU64(i int, x uint64)

func (*Header) SetU8

func (h *Header) SetU8(i int, x uint8)

func (*Header) SetUintptr

func (h *Header) SetUintptr(i int, x uintptr)

func (*Header) SetUnsafePointer

func (h *Header) SetUnsafePointer(i int, x unsafe.Pointer)

func (*Header) Strings

func (h *Header) Strings() []string

func (*Header) TypedLen

func (h *Header) TypedLen(t reflect.Type) int

func (*Header) Uint16s

func (h *Header) Uint16s() []uint16

func (*Header) Uint32s

func (h *Header) Uint32s() []uint32

func (*Header) Uint64s

func (h *Header) Uint64s() []uint64

func (*Header) Uint8s

func (h *Header) Uint8s() []uint8

func (*Header) Uintptrs

func (h *Header) Uintptrs() []uintptr

func (*Header) Uints

func (h *Header) Uints() []uint

func (*Header) UnsafePointers

func (h *Header) UnsafePointers() []unsafe.Pointer

type Iterator

type Iterator interface {
	Start() (int, error)
	Next() (int, error)
	NextValidity() (int, bool, error)
	NextValid() (int, int, error)
	NextInvalid() (int, int, error)
	Coord() []int
	Done() bool

Iterator is the generic iterator interface

type NoOpError

type NoOpError interface {
	NoOp() bool

NoOpError is a useful for operations that have no op.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto