ring

package
v0.0.0-...-e348a8d Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ring

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

func New

func New[T any](size int64) *Ring[T]

func (*Ring[T]) Empty

func (slf *Ring[T]) Empty() bool

func (*Ring[T]) Length

func (slf *Ring[T]) Length() int64

func (*Ring[T]) Pop

func (slf *Ring[T]) Pop() (T, bool)

func (*Ring[T]) PopN

func (slf *Ring[T]) PopN(n int64) ([]T, bool)

func (*Ring[T]) Push

func (slf *Ring[T]) Push(item T)

Jump to

Keyboard shortcuts

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