part

package
v0.23.13 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buf added in v0.21.1

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

func New

func New[T any](maxsize ...int) *Buf[T]

func (*Buf[T]) Append added in v0.21.1

func (t *Buf[T]) Append(data []T) error

func (*Buf[T]) AppendBufCopy added in v0.23.10

func (t *Buf[T]) AppendBufCopy(buf *[]T)

*Need to lock when processing buf or Make sure buf only processing by AppendBufCopy

*Not use b = make() to avoid pointer change

func (*Buf[T]) Clear added in v0.21.1

func (t *Buf[T]) Clear()

func (*Buf[T]) GetCopyBuf added in v0.21.1

func (t *Buf[T]) GetCopyBuf() (buf []T)

func (*Buf[T]) GetModified added in v0.21.1

func (t *Buf[T]) GetModified() Modified

func (*Buf[T]) GetPureBuf added in v0.21.1

func (t *Buf[T]) GetPureBuf() (buf []T)

unsafe

func (*Buf[T]) HadModified added in v0.21.1

func (t *Buf[T]) HadModified(mt Modified) (modified bool, err error)

func (*Buf[T]) IsEmpty added in v0.21.1

func (t *Buf[T]) IsEmpty() bool

func (*Buf[T]) RemoveBack added in v0.21.1

func (t *Buf[T]) RemoveBack(n int) error

func (*Buf[T]) RemoveFront added in v0.21.1

func (t *Buf[T]) RemoveFront(n int) error

func (*Buf[T]) Reset added in v0.21.1

func (t *Buf[T]) Reset()

func (*Buf[T]) SetModified added in v0.21.1

func (t *Buf[T]) SetModified()

unsafe

func (*Buf[T]) Size added in v0.21.1

func (t *Buf[T]) Size() int

type Modified

type Modified struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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