Skip to main content

ModelStream

Trait ModelStream 

Source
pub trait ModelStream: Stream<Item = ModelEvent> + Send { }
Expand description

Provider-neutral asynchronous stream of normalized model events.

Streams should be lazy: polling owns request progress. Implementations must not create detached tasks. A fully consumed stream starts with exactly one Started event and ends with exactly one Completed or Failed event.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> ModelStream for T
where T: Stream<Item = ModelEvent> + Send,