Documentation
¶
Index ¶
- type Pool
- func (p *Pool[T]) Add(v T)
- func (p *Pool[T]) Clear(clean func(T))
- func (p *Pool[T]) Dequeue() (v T, ok bool)
- func (p *Pool[T]) Front() (v T, ok bool)
- func (p *Pool[T]) Has(v T) bool
- func (p *Pool[T]) Next() (v T, ok bool)
- func (p *Pool[T]) Peek() (v T, ok bool)
- func (p *Pool[T]) Pop() (v T, ok bool)
- func (p *Pool[T]) Push(v T)
- func (p *Pool[T]) Random() (v T, ok bool)
- func (p *Pool[T]) Range(fn func(T) bool)
- func (p *Pool[T]) Remove(v T)
- func (p *Pool[T]) Size() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool[T comparable] struct { // contains filtered or unexported fields }
func New ¶
func New[T comparable]() *Pool[T]
Click to show internal directories.
Click to hide internal directories.