stack

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SliceStack

type SliceStack[T any] []T

func NewSlice

func NewSlice[T any]() *SliceStack[T]

func (*SliceStack[T]) Len

func (s *SliceStack[T]) Len() int

func (*SliceStack[T]) Pop

func (s *SliceStack[T]) Pop() (T, bool)

func (*SliceStack[T]) Push

func (s *SliceStack[T]) Push(v T)

type Stack

type Stack[T any] interface {
	Push(v T)
	Pop() (T, bool)
	Len() int
}

func New

func New[T any]() Stack[T]

type SyncDoneStack

type SyncDoneStack[T any] struct {
	*SyncStack[T]
	// contains filtered or unexported fields
}

func NewSyncDone

func NewSyncDone[T any]() *SyncDoneStack[T]

func (*SyncDoneStack[T]) All

func (s *SyncDoneStack[T]) All() iter.Seq[T]

func (*SyncDoneStack[T]) Done

func (s *SyncDoneStack[T]) Done() bool

func (*SyncDoneStack[T]) Finish

func (s *SyncDoneStack[T]) Finish(done bool)

type SyncStack

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

func NewSync

func NewSync[T any]() *SyncStack[T]

func (*SyncStack[T]) Len

func (s *SyncStack[T]) Len() int

func (*SyncStack[T]) Pop

func (s *SyncStack[T]) Pop() (T, bool)

func (*SyncStack[T]) Push

func (s *SyncStack[T]) Push(v T)

Jump to

Keyboard shortcuts

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