Skip to main content

LlmStreamInner

Trait LlmStreamInner 

Source
pub trait LlmStreamInner: Stream<Item = Result<Json>> + Send {
    // Required method
    fn close(
        self: Pin<&mut Self>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>;

    // Provided method
    fn terminalize(self: Pin<&mut Self>) { ... }
}
Expand description

Internal close-aware stream implementation.

Required Methods§

Source

fn close( self: Pin<&mut Self>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>

Stop the producer and wait for cleanup. Implementations must be idempotent.

Provided Methods§

Source

fn terminalize(self: Pin<&mut Self>)

Release lifecycle guards once the consumer-visible stream has ended while retaining the producer for a later explicit close.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§