ring

package
v0.0.0-...-ff78b6e Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

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

func MakeBuffer

func MakeBuffer[T any](length, capacity int) Buffer[T]

func NewBuffer

func NewBuffer[T any](length, capacity int) *Buffer[T]

func (*Buffer[T]) Capacity

func (r *Buffer[T]) Capacity() int

func (*Buffer[T]) Clear

func (r *Buffer[T]) Clear()

func (*Buffer[T]) Get

func (r *Buffer[T]) Get(n int) T

func (*Buffer[T]) Length

func (r *Buffer[T]) Length() int

func (*Buffer[T]) PopBack

func (r *Buffer[T]) PopBack() (T, bool)

func (*Buffer[T]) PopFront

func (r *Buffer[T]) PopFront() (T, bool)

func (*Buffer[T]) PushBack

func (r *Buffer[T]) PushBack(value T)

func (*Buffer[T]) PushFront

func (r *Buffer[T]) PushFront(value T)

Jump to

Keyboard shortcuts

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