pub struct OpenAiSseState { /* private fields */ }Expand description
Incremental SSE assembler for one interpretation.
Implementations§
Source§impl OpenAiSseState
impl OpenAiSseState
Sourcepub fn new(
max_line_bytes: usize,
max_event_bytes: usize,
max_tool_arg_bytes: usize,
) -> Self
pub fn new( max_line_bytes: usize, max_event_bytes: usize, max_tool_arg_bytes: usize, ) -> Self
Construct with bounds from interpretation limits.
Sourcepub fn push_bytes(
&mut self,
chunk: &[u8],
) -> Result<Vec<AcpFragment>, InterpreterError>
pub fn push_bytes( &mut self, chunk: &[u8], ) -> Result<Vec<AcpFragment>, InterpreterError>
Ingest a raw transport chunk; return fragments to apply.
Sourcepub fn seal_clean(&mut self) -> Result<Vec<AcpFragment>, InterpreterError>
pub fn seal_clean(&mut self) -> Result<Vec<AcpFragment>, InterpreterError>
Flush on clean end: incomplete trailing event without a DONE marker fails closed.
Trait Implementations§
Source§impl Debug for OpenAiSseState
impl Debug for OpenAiSseState
Source§impl Default for OpenAiSseState
impl Default for OpenAiSseState
Source§fn default() -> OpenAiSseState
fn default() -> OpenAiSseState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OpenAiSseState
impl RefUnwindSafe for OpenAiSseState
impl Send for OpenAiSseState
impl Sync for OpenAiSseState
impl Unpin for OpenAiSseState
impl UnsafeUnpin for OpenAiSseState
impl UnwindSafe for OpenAiSseState
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