pub struct ParserOutput {
pub forward_text: String,
pub forward_reasoning: String,
pub tool_calls: Vec<ToolCall>,
pub errors: Vec<NormalizationError>,
}Expand description
Result of feeding one chunk of input to a parser.
All four fields are independent: a single chunk can produce text bytes, reasoning bytes, completed tool calls, and errors all at once. Empty vectors / strings are the common case and indicate “nothing to flush”.
Fields§
§forward_text: StringBytes to emit on the downstream text channel.
forward_reasoning: StringBytes to emit on the downstream reasoning channel.
tool_calls: Vec<ToolCall>Tool calls fully assembled by this chunk. Each item is ready to be
emitted as a single, complete LlmStreamEvent::ToolCallDelta.
errors: Vec<NormalizationError>Non-fatal normalization issues detected by this chunk.
Implementations§
Trait Implementations§
Source§impl Clone for ParserOutput
impl Clone for ParserOutput
Source§fn clone(&self) -> ParserOutput
fn clone(&self) -> ParserOutput
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 ParserOutput
impl Debug for ParserOutput
Source§impl Default for ParserOutput
impl Default for ParserOutput
Source§fn default() -> ParserOutput
fn default() -> ParserOutput
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ParserOutput
impl RefUnwindSafe for ParserOutput
impl Send for ParserOutput
impl Sync for ParserOutput
impl Unpin for ParserOutput
impl UnwindSafe for ParserOutput
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