Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Iterator ¶
type Iterator[T any] interface { // Next advances the iterator to the first/next item, // returning true if successful meaning there is an item // available to be fetched with Value and false otherwise. Next() bool // Value returns the current item if there is any and panics // otherwise. // // Note: Use Next to ensure there is an item. Value() T }
type SliceIterator ¶
type SliceIterator[T any] struct { Data []T // contains filtered or unexported fields }
SliceIterator provides an iterator for slices that conforms to the Iterator protocol.
func (*SliceIterator[T]) Next ¶
func (it *SliceIterator[T]) Next() bool
func (*SliceIterator[T]) Value ¶
func (it *SliceIterator[T]) Value() T
Click to show internal directories.
Click to hide internal directories.