|
|
virtual | ~Stream ()=default |
| | Destroy this stream and release its producer resources.
|
| |
|
| Stream ()=default |
| | Construct a stream in its initial state.
|
| |
|
| Stream (const Stream &)=delete |
| | Streams cannot be copied.
|
| |
|
Stream & | operator= (const Stream &)=delete |
| | Streams cannot be copy-assigned.
|
| |
|
| Stream (Stream &&) noexcept=default |
| | Move a stream and its terminal state.
|
| |
|
Stream & | operator= (Stream &&) noexcept=default |
| | Move-assign a stream and its terminal state.
|
| |
| Result< std::optional< T > > | Next () |
| | Return the next value, or std::nullopt when the stream is exhausted.
|
| |
|
Result< std::vector< T > > | ToVector () |
| | Consume the remaining values into a vector.
|
| |
template<typename T>
class iceberg::Stream< T >
A pull-based stream whose reads may fail.
Stream implementations own any resources needed to produce values. Destroying a stream releases those resources, including when consumption stops before reaching the end. Streams are not thread-safe unless an implementation explicitly says otherwise. Once Next() returns an error or std::nullopt, the stream is terminal. Subsequent calls return the same terminal result without invoking the implementation again.
- Template Parameters
-
| T | Value returned by the stream. |