Documentation
¶
Index ¶
- Constants
- type Stable
- func (s *Stable[T]) Append(value T) *T
- func (s *Stable[T]) AppendMany(values ...T) (first *T)
- func (s *Stable[T]) Cap() int
- func (s *Stable[T]) Get(index int) *T
- func (s *Stable[T]) Init()
- func (s *Stable[T]) InitWithCapacity(elementsPerBucket int)
- func (s *Stable[T]) Len() int
- func (s *Stable[T]) Pointers() iter.Seq2[int, *T]
- func (s *Stable[T]) Values() iter.Seq2[int, T]
Constants ¶
View Source
const DefaultElementsPerBucket = 32
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stable ¶
type Stable[T any] struct { // contains filtered or unexported fields }
Stable is a resizable array whose values will never move in memory. This means it is safe to take a pointer to a value within the array while continuing to append to it.
func (*Stable[T]) AppendMany ¶
func (s *Stable[T]) AppendMany(values ...T) (first *T)
func (*Stable[T]) InitWithCapacity ¶ added in v1.0.1
Click to show internal directories.
Click to hide internal directories.