Skip to content

ReadableStreamController<T>

Namespace: Vercel.AI.Util

public sealed class ReadableStreamController<T>

Enqueues chunks into a ReadableStream%601.

Type parameters

Name Description
T

Inheritance: object

View source

public void Close()

Closes the stream.

View source

public void Enqueue(T chunk)

Queues <code class=“paramref”>chunk</code> for the next reader.

Parameters

Name Type Description
chunk T

View source

public void Error(object? reason)

Fails the stream. <code class=“paramref”>reason</code> may be null.

Parameters

Name Type Description
reason object

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product