ring

package
v0.0.0-...-af5906d Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 0 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 {
	Value T
	// contains filtered or unexported fields
}

func New

func New[T any](n int) *Ring[T]

func (*Ring[T]) Do

func (r *Ring[T]) Do(f func(T))

func (*Ring[T]) Len

func (r *Ring[T]) Len() int
func (r *Ring[T]) Link(s *Ring[T]) *Ring[T]

func (*Ring[T]) Move

func (r *Ring[T]) Move(n int) *Ring[T]

func (*Ring[T]) Next

func (r *Ring[T]) Next() *Ring[T]

func (*Ring[T]) Prev

func (r *Ring[T]) Prev() *Ring[T]
func (r *Ring[T]) Unlink(n int) *Ring[T]

Jump to

Keyboard shortcuts

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