Trait OpenAiStreamExt

Source
pub trait OpenAiStreamExt: Stream<Item = Result<String>> + Sized {
    // Provided methods
    fn chars(
        self,
    ) -> FlatMap<Self, Iter<IntoIter<Result<char, Error>>>, fn(Result<String>) -> Iter<IntoIter<Result<char, Error>>>> { ... }
    fn lines(self) -> ReceiverStream<Result<String>>
       where Self: Send + 'static { ... }
}

Provided Methods§

Source

fn chars( self, ) -> FlatMap<Self, Iter<IntoIter<Result<char, Error>>>, fn(Result<String>) -> Iter<IntoIter<Result<char, Error>>>>

Source

fn lines(self) -> ReceiverStream<Result<String>>
where Self: Send + 'static,

Outputs a stream of Strings where each item is a line

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> OpenAiStreamExt for T
where T: Stream<Item = Result<String>> + Sized,