1
0
mirror of https://github.com/danog/amp.git synced 2024-12-11 17:09:40 +01:00
amp/lib/Stream.php

22 lines
484 B
PHP
Raw Normal View History

2020-05-13 17:15:21 +02:00
<?php
namespace Amp;
/**
* A stream is an asynchronous set of ordered values.
*
* @template-covariant TValue
*/
interface Stream
{
/**
* Succeeds with a tuple of the yielded value and key or null if the stream has completed. If the stream fails,
* the returned promise will fail with the same exception.
*
* @return Promise<array>
*
* @throws \Throwable The exception used to fail the stream.
*/
public function continue(): Promise;
}