Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Flatten ¶
Flatten is a function that merges a set of provided `iter.Seq[T]` values into a single `iter.Seq[T]` value. The values of each input are yielded in the order yielded by each `iter.Seq[T]`, in the order provided to the function.
Types ¶
type SeqReader ¶ added in v1.11.3
type SeqReader[T any] struct { // contains filtered or unexported fields }
SeqReader is a struct that provides functionality for reading from an iter.Seq value.
SeqReader is provided as a way to read chunks of values from an iter.Seq without needing to allocate a new slice for each chunk.
func NewSeqReader ¶ added in v1.11.3
NewSeqReader is a function that constructs a new SeqReader that wraps the given iter.Seq value.
func (*SeqReader[T]) Close ¶ added in v1.11.3
Close is a function that indicates that the caller will not continue to read from the iter.Seq. A call to Read after calling Close is considered a programming error.
func (*SeqReader[T]) Read ¶ added in v1.11.3
Read is a function that fills the given buffer with elements from the internal iter.Seq value. A count of total items read into the buffer is returned. The count returned will be less than the size of the buffer when fewer items remain in the internal iter.Seq value. In this case, the sequence is complete and subsequent calls to Read will return a count of 0.