pub struct JsonlThreadEventParser { /* private fields */ }Expand description
Parses Codex --json JSONL logs into typed ThreadEvent values.
This API is synchronous and line-oriented (v1 contract).
Implementations§
Source§impl JsonlThreadEventParser
impl JsonlThreadEventParser
Sourcepub fn parse_line(
&mut self,
line: &str,
) -> Result<Option<ThreadEvent>, ExecStreamError>
pub fn parse_line( &mut self, line: &str, ) -> Result<Option<ThreadEvent>, ExecStreamError>
Parses a single logical JSONL line.
- Returns
Ok(None)for empty / whitespace-only lines. - Otherwise returns
Ok(Some(ThreadEvent))on success. - Returns
Err(ExecStreamError)on JSON parse / normalization / typed parse failures.
Trait Implementations§
Source§impl Clone for JsonlThreadEventParser
impl Clone for JsonlThreadEventParser
Source§fn clone(&self) -> JsonlThreadEventParser
fn clone(&self) -> JsonlThreadEventParser
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 JsonlThreadEventParser
impl Debug for JsonlThreadEventParser
Source§impl Default for JsonlThreadEventParser
impl Default for JsonlThreadEventParser
Source§fn default() -> JsonlThreadEventParser
fn default() -> JsonlThreadEventParser
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for JsonlThreadEventParser
impl RefUnwindSafe for JsonlThreadEventParser
impl Send for JsonlThreadEventParser
impl Sync for JsonlThreadEventParser
impl Unpin for JsonlThreadEventParser
impl UnsafeUnpin for JsonlThreadEventParser
impl UnwindSafe for JsonlThreadEventParser
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