Documentation
¶
Index ¶
- Variables
- type Queue
- func (q *Queue[E]) Cap() uint32
- func (q *Queue[E]) Get() (E, uint32, error)
- func (q *Queue[E]) GetEnough(size uint32) ([]E, uint32, uint32)
- func (q *Queue[E]) IsEmpty() bool
- func (q *Queue[E]) IsFull() bool
- func (q *Queue[E]) Len() uint32
- func (q *Queue[E]) MustGet() (E, uint32)
- func (q *Queue[E]) MustPut(value E) uint32
- func (q *Queue[E]) Put(value E) (uint32, error)
- func (q *Queue[E]) PutEnough(values ...E) (uint32, uint32)
- func (q *Queue[E]) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrQueueIsFull 表明队列已满。 ErrQueueIsFull = errors.New("队列已满") // ErrQueueIsEmpty 表明队列为空。 ErrQueueIsEmpty = errors.New("队列为空") )
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue[E any] struct { // contains filtered or unexported fields }
Queue 队列结构体。使用 New 创建变量。
Click to show internal directories.
Click to hide internal directories.