Documentation
¶
Index ¶
- Variables
- type Queue
- func (q *Queue[T]) Contains(item T, equalFunc func(a, b T) bool) bool
- func (q *Queue[T]) ForcePush(item T)
- func (q *Queue[T]) Full() bool
- func (q *Queue[T]) Len() int
- func (q *Queue[T]) Peek(item T, equalFunc func(a, b T) bool) int
- func (q *Queue[T]) Pop() (T, error)
- func (q *Queue[T]) Push(item T) error
- func (q *Queue[T]) Remove(item T, equalFunc func(a, b T) bool) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrQueueFull = errors.New("queue is full") ErrQueueEmpty = errors.New("queue is empty") )
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue[T any] struct { // contains filtered or unexported fields }
Queue has its capacity. Push returns an error when the Queue is full.
Click to show internal directories.
Click to hide internal directories.