pub struct CodexSessionParser { /* private fields */ }Expand description
Parser for Codex CLI session JSONL files.
Implementations§
Source§impl CodexSessionParser
impl CodexSessionParser
Sourcepub fn new(machine_id: impl Into<String>) -> Self
pub fn new(machine_id: impl Into<String>) -> Self
Create a new parser with the given machine ID.
Sourcepub fn parse_incremental(
&self,
path: &Path,
session_id: &str,
start_position: &FilePosition,
) -> Result<ParseResult, TranscriptError>
pub fn parse_incremental( &self, path: &Path, session_id: &str, start_position: &FilePosition, ) -> Result<ParseResult, TranscriptError>
Parse new entries from a session file starting at the given position.
Returns events, updated position, and dedup keys seen.
Sourcepub fn parse_full(
&self,
path: &Path,
session_id: &str,
) -> Result<ParseResult, TranscriptError>
pub fn parse_full( &self, path: &Path, session_id: &str, ) -> Result<ParseResult, TranscriptError>
Parse entire session file from the beginning.
Auto Trait Implementations§
impl Freeze for CodexSessionParser
impl RefUnwindSafe for CodexSessionParser
impl Send for CodexSessionParser
impl Sync for CodexSessionParser
impl Unpin for CodexSessionParser
impl UnwindSafe for CodexSessionParser
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