Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pointer ¶
type Pointer[T any] interface { *T }
Pointer is a constraint that ensures T is always a pointer type.
type QueueValidationInterface ¶
type QueueValidationInterface[T any] interface { // Enqueue adds an element to the queue and blocks if the queue is full. Enqueue(T) // Dequeue removes and returns the oldest element. // If the queue is empty (no element is available), it should return a empty T and false, otherwise true. Dequeue() (T, bool) // FreeSlots returns how many more elements can be enqueued before the queue is full. FreeSlots() uint64 // UsedSlots returns how many elements are currently queued. UsedSlots() uint64 }
QueueValidationInterface is a *type constraint* that ensures any type Q has these methods. We never store Q in a runtime interface— we only use QueueValidationInterface at compile time to ensure matching signatures.
Click to show internal directories.
Click to hide internal directories.