structures

package
v0.2.5-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorEmptyDequeue = errors.New("empty dequeue")
View Source
var ErrorEmptyQueue = errors.New("empty queue")
View Source
var ErrorEmptyStack = errors.New("empty Stack")

Functions

This section is empty.

Types

type AsyncDequeue

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

func NewAsyncDequeue

func NewAsyncDequeue[T any]() *AsyncDequeue[T]

func (*AsyncDequeue[T]) Back

func (st *AsyncDequeue[T]) Back() (T, error)

func (*AsyncDequeue[T]) Empty

func (st *AsyncDequeue[T]) Empty() bool

func (*AsyncDequeue[T]) Front

func (st *AsyncDequeue[T]) Front() (T, error)

func (*AsyncDequeue[T]) MustPopBack

func (st *AsyncDequeue[T]) MustPopBack() T

func (*AsyncDequeue[T]) MustPopFront

func (st *AsyncDequeue[T]) MustPopFront() T

func (*AsyncDequeue[T]) PopBack

func (st *AsyncDequeue[T]) PopBack() (T, error)

func (*AsyncDequeue[T]) PopFront

func (st *AsyncDequeue[T]) PopFront() (T, error)

func (*AsyncDequeue[T]) PushBack

func (st *AsyncDequeue[T]) PushBack(value T)

func (*AsyncDequeue[T]) PushFront

func (st *AsyncDequeue[T]) PushFront(value T)

type AsyncQueue

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

func NewAsyncQueue

func NewAsyncQueue[T any]() *AsyncQueue[T]

func (*AsyncQueue[T]) Empty

func (st *AsyncQueue[T]) Empty() bool

func (*AsyncQueue[T]) Front

func (st *AsyncQueue[T]) Front() (T, error)

func (*AsyncQueue[T]) Pop

func (st *AsyncQueue[T]) Pop() (T, error)

func (*AsyncQueue[T]) Push

func (st *AsyncQueue[T]) Push(value T)

type AsyncStack

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

func NewAsyncStack

func NewAsyncStack[T any]() *AsyncStack[T]

func (*AsyncStack[T]) Empty

func (st *AsyncStack[T]) Empty() bool

func (*AsyncStack[T]) Pop

func (st *AsyncStack[T]) Pop() (T, error)

func (*AsyncStack[T]) Push

func (st *AsyncStack[T]) Push(value T)

func (*AsyncStack[T]) Top

func (st *AsyncStack[T]) Top() (T, error)

type Dequeue

type Dequeue[T any] []T

func NewDequeue

func NewDequeue[T any]() Dequeue[T]

func (*Dequeue[T]) Back

func (st *Dequeue[T]) Back() (T, error)

func (*Dequeue[T]) Empty

func (st *Dequeue[T]) Empty() bool

func (*Dequeue[T]) Front

func (st *Dequeue[T]) Front() (T, error)

func (*Dequeue[T]) MustPopBack

func (st *Dequeue[T]) MustPopBack() T

func (*Dequeue[T]) MustPopFront

func (st *Dequeue[T]) MustPopFront() T

func (*Dequeue[T]) PopBack

func (st *Dequeue[T]) PopBack() (T, error)

func (*Dequeue[T]) PopFront

func (st *Dequeue[T]) PopFront() (T, error)

func (*Dequeue[T]) PushBack

func (st *Dequeue[T]) PushBack(value T)

func (*Dequeue[T]) PushFront

func (st *Dequeue[T]) PushFront(value T)

type Queue

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

func NewQueue

func NewQueue[T any]() Queue[T]

func (*Queue[T]) Empty

func (st *Queue[T]) Empty() bool

func (*Queue[T]) Front

func (st *Queue[T]) Front() (T, error)

func (*Queue[T]) MustPop

func (st *Queue[T]) MustPop() T

func (*Queue[T]) Pop

func (st *Queue[T]) Pop() (T, error)

func (*Queue[T]) Push

func (st *Queue[T]) Push(value T)

type Stack

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

func NewStack

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

func (*Stack[T]) Empty

func (st *Stack[T]) Empty() bool

func (*Stack[T]) MustPop

func (st *Stack[T]) MustPop() T

func (*Stack[T]) Pop

func (st *Stack[T]) Pop() (T, error)

func (*Stack[T]) Push

func (st *Stack[T]) Push(value T)

func (*Stack[T]) Top

func (st *Stack[T]) Top() (T, error)

Jump to

Keyboard shortcuts

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