ReadableStreamController<T>
Namespace: Vercel.AI.Util
public sealed class ReadableStreamController<T>Enqueues chunks into a ReadableStream%601.
Type parameters
| Name | Description |
|---|---|
T |
Inheritance: object
Methods
Section titled “Methods”Close()
Section titled “Close()”public void Close()Closes the stream.
Enqueue(T)
Section titled “Enqueue(T)”public void Enqueue(T chunk)Queues <code class=“paramref”>chunk</code> for the next reader.
Parameters
| Name | Type | Description |
|---|---|---|
chunk |
T |
Error(object?)
Section titled “Error(object?)”public void Error(object? reason)Fails the stream. <code class=“paramref”>reason</code> may be null.
Parameters
| Name | Type | Description |
|---|---|---|
reason |
object |
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product