Skip to content

IteratorResult<T>

Namespace: Vercel.AI.Util

public struct IteratorResult<T>

Result of one async-iterator step.

Type parameters

Name Description
T

View source

public bool Done { readonly get; set; }

Whether iteration is finished.

Value: bool

View source

public bool HasValue { readonly get; set; }

Whether Value is present.

Value: bool

View source

public T Value { readonly get; set; }

Yielded value.

Value: T

View source

public static IteratorResult<T> Complete()

A finished step.

Returns: IteratorResult<T>

View source

public static IteratorResult<T> Of(T value)

A value step.

Parameters

Name Type Description
value T

Returns: IteratorResult<T>

View source

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