pub struct ResponseStreamToImageStream { /* private fields */ }Expand description
Stateful converter: OpenAI Responses API stream events → OpenAI Image Generation stream events.
Accumulates image results from OutputItemAdded/OutputItemDone events and
tool configuration from response state events, then emits
image_generation.partial_image and image_generation.completed as images
become available.
Implementations§
Source§impl ResponseStreamToImageStream
impl ResponseStreamToImageStream
pub fn on_event( &mut self, event: ResponseStreamEvent, out: &mut Vec<ImageGenerationStreamEvent>, )
pub fn finish(&mut self, out: &mut Vec<ImageGenerationStreamEvent>)
Trait Implementations§
Source§impl Clone for ResponseStreamToImageStream
impl Clone for ResponseStreamToImageStream
Source§fn clone(&self) -> ResponseStreamToImageStream
fn clone(&self) -> ResponseStreamToImageStream
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResponseStreamToImageStream
impl Debug for ResponseStreamToImageStream
Source§impl Default for ResponseStreamToImageStream
impl Default for ResponseStreamToImageStream
Source§fn default() -> ResponseStreamToImageStream
fn default() -> ResponseStreamToImageStream
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ResponseStreamToImageStream
impl RefUnwindSafe for ResponseStreamToImageStream
impl Send for ResponseStreamToImageStream
impl Sync for ResponseStreamToImageStream
impl Unpin for ResponseStreamToImageStream
impl UnsafeUnpin for ResponseStreamToImageStream
impl UnwindSafe for ResponseStreamToImageStream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more